Modulor. Custom Software Solutions.
Share.
Facebook | Twitter | LinkedIn
Posted by: Gustavo on February 9, 2011
Category: HTML
Many times, websites require the generation of menus that people can use to navigate around.

From an html coder point of view, menus can be built in many different ways. We have found out the two most common ways to build them are a) Using Unordered Lists (UL) and b) Using DIVs.

However, the most semantically correct approach is to use ULs. The main difference you'll find is that with ULs you can have easy to read code and your CSS definitions will be shorter and easier to build:

div.menu {} div.menu_item {} div.menu_item div.sub_item {}

vs

ul {}
li {}
ul ul li {}