0

I would like to know what is the correct way (semantically) to build a page for listing something like users, products, articles, etc.

What is semantically correct? Listing items using the ul/ol tags or div tags?

The purpose of the page is to list something. So, I guess ul/ol should be used. On the other side, these lists aren't navigational menus or somekind of list of related items.

So, what's your opinion about this?

DisplayName
  • 3,093
  • 5
  • 35
  • 42
Hugo Durães
  • 55
  • 1
  • 2
  • 7

3 Answers3

2

If it is a list then use the 'ul'/'ol' tags. If it is tabular data, use a 'table'.

rcravens
  • 8,320
  • 2
  • 33
  • 26
  • Yes it is a list. Let me show you some examples: - Regular wordpress blog: http://hugoduraes.com/ Div tags are being used to list articles - Restaurants list: http://www.igogo.pt/restaurantes/ ul/ol tags are being used to list restaurants What is more correct to list these kind of contents? – Hugo Durães Jan 21 '11 at 10:10
1

The purpose of the page is to list something.

As mentioned by you, you are listing something so use ul and ol tags :)

Clyde Lobo
  • 9,126
  • 7
  • 34
  • 61
  • Yes it is a list. Let me show you some examples: - Regular wordpress blog: hugoduraes.com Div tags are being used to list articles - Restaurants list: igogo.pt/restaurantes ul/ol tags are being used to list restaurants What is more correct to list these kind of contents? – Hugo Durães Jan 21 '11 at 10:43
0

Definitely list ul and ol tags.

Though, if you do care about semantics in web documents, please consider using HTML5 (now renamed only to HTML) semantic features in order to replace non-semantic div tags in the case you are using any. You can find a really good introduction at http://diveintohtml5.ep.io/semantics.html

DanBeale
  • 310
  • 4
  • 15
Zdenek F
  • 1,649
  • 1
  • 15
  • 27
  • He does not need HTML5 to display some lists in a semantically correct way. Semantics do not start at HTML5. – kapa Jan 20 '11 at 12:39
  • I haven't told him he needs HTML5 to display some list in a semantically correct way. Nevertheless, I've modified my answer just to make its meaning more clear. – Zdenek F Jan 20 '11 at 12:55