mattshiao
09-05-2010, 05:58 AM
Hi,
When I create navigation menus, I typically have html markup this way:
<div id="mainMenu">
<div><a href="#">Link 1</a></div>
<div><a href="#">Link 2</a></div>
<div><a href="#">Link 3</a></div>
</div>
I found many people use ul instead:
<ul id="mainMenu">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
Both work after some styling, are there advantages using ul ? I believe it's the more popular way, but to me ul needs more works like hiding the bullets and taking away margins and paddings.
TIA
When I create navigation menus, I typically have html markup this way:
<div id="mainMenu">
<div><a href="#">Link 1</a></div>
<div><a href="#">Link 2</a></div>
<div><a href="#">Link 3</a></div>
</div>
I found many people use ul instead:
<ul id="mainMenu">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
Both work after some styling, are there advantages using ul ? I believe it's the more popular way, but to me ul needs more works like hiding the bullets and taking away margins and paddings.
TIA