Suppose I have ten list item, in that case I can use both div and li to display them one aft开发者_StackOverflow中文版er another. But my concern is which one will be better approach in page loading perspective?
Semantically, if you have items in a list <li>
is how they should be marked up.
use <li>
, they are semantically more correct. furthermore, if you use <ul>
or <ol>
(or <dl>
) you can only have <li>
as child elements
I would use list items, as they're intended for grouping various items into... well, lists. If you don't actually want it to look like an ordered (numbered) <ol>
or unordered (bulleted) <ul>
list, then you can always use CSS to style the graphics out.
精彩评论