Emran
Emran

Reputation: 33

Which one is better to use for list item?

Suppose I have ten list item, in that case I can use both div and li to display them one after another. But my concern is which one will be better approach in page loading perspective?

Upvotes: 0

Views: 71

Answers (3)

erekalper
erekalper

Reputation: 887

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.

Upvotes: 0

knittl
knittl

Reputation: 265281

use <li>, they are semantically more correct. furthermore, if you use <ul> or <ol> (or <dl>) you can only have <li> as child elements

Upvotes: 1

trickwallett
trickwallett

Reputation: 2468

Semantically, if you have items in a list <li> is how they should be marked up.

Upvotes: 2

Related Questions