HTML site development: div vs ul for navigation and menus

I am developing a Web 2.0 site, and I have watched how sites work with menus and navigation bars. Many sites (like Twitter) use UL, while sites like stackoverflow use divs that contain identifiers that contain links.

Is there any advantage not to use UL, except that it fixes some IE errors?

is there any advantage to using UL?

Thanks!

+3
source share
3 answers

ul/li , (, ), - , -.

, , ul, li a, CSS , CSS sprite backgrounds.

divs , . , CSS, , , , , .

, dom javascript, ...

+9

, , UL . UL - , children (<li>) - , , . html /, div.

? . , - ul.

ul CSS, .

+13

UL html. - divs, .

Basically the difference is that the ul-tag is a bit more specialized, but it can deliver almost the same thing as divs.

+8
source

Source: https://habr.com/ru/post/1707743/


All Articles