Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I write an "archive page" or "category index" with html5?

Tags:

html

seo

I have a link list, where every item is associated with a short description and some meta info such as pubdate, author etc. How should I markup this in html5?

<ul>
    <li>
        <section>    .... OR ARTICLE?
           <header>
               <h1>title</h1>
               pubdate, author, etc
           </header>
           shortdesc
        </section>
    </li>
    .... repeat
</ul>

Do you think it is a good idea to use sections/article?

Or are plain <li>s better?

Article or section?

IMPORTANT NOTE: every item does not contain full content (article), just a short description and the link to the page that actually contains the article.

I'm also interested in a SEO point-of-view!

like image 417
skyline26 Avatar asked Apr 23 '12 09:04

skyline26


1 Answers

I would suggest using article here as each item is a separate entity on its own and could be syndicated (e.g. in a RSS feed). I wrote a bit about this a while ago: HTML5: Section or Article?.

You also don't really need to use a list here, as each article could be seen as a list item.

I would also suggest using the time element to enclose the published date of each entry.

As for SEO what I've suggested is fine, as is the example code that you've posted.

like image 61
Ian Devlin Avatar answered Oct 30 '22 12:10

Ian Devlin