开发者

Web designers... for horizontal menus, is there an advantage of using multiple bullets?

I'm thinking of just consolidating my menu to just an <li id="menu"><a href="News">News</a>&nbsp;&nbsp;<a href="blog">blog</a>&nbsp;&nbsp;<a

href="other stuff">other stuff</a>

This seems sooooo much less complicated than the typical web designer's choice of making each subsection, news, blog, otherstuff each different li ids. This way, you won't need to worry about consistency or anything.

So why do people use multiple li i开发者_运维技巧ds instead? I'm honestly curious. Thanks!


It's because it's an actual list of items. Since HTML is markup, you want to make sure you use the right markup for the right content. This is the same reason that people don't use tables for presentation since tables are for tabular data and not presentation. Since your menu is a list you should use a list.

This is very apparent when you remove the style for your document. A well structured document with the proper markup will still make sense without any styles applied to it. And keep in mind that's how bots see it. And accessibility tools.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜