I was browsing the w3.org page about the article
element and one of the exemples surprised me:
<article>
<header>
<h1>The Very First Rule of Life</h1>
<p><time pubdate datetime="2009-10-09T14:28-08:00"></time></p>
</header>
<p>If there's a microphone anywhere near you, assume it's hot and
sending whatever you're saying to the world. Seriously.</p>
<p>...</p>
<section>
<h1>Comments</h1>
<article>
<footer>
<p>Posted by: George Washington</p>
<p><time pubdate datetime="2009-10-10T19:10-08:00"></time></p>
</footer>
<p>Yeah! Especially when talking about your lobbyist friends!</p>
</article>
<article>
<footer>
<p>Posted by: George Hammond</p>
<p><time pubdate datetime="2009-10-10T19:15-08:00"></time></p>
</footer>
<p>Hey, you have the same first name as me.</p>
</article>
</section>
</article>
As you can see, the comments info (poster name and date) are in a footer
element at the begining of each comment.
According to W3.org 4.3.8 The footer
element it is a valid usage, but it seems quite strange to use it that way.
A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.
It is right, nothing says that it should sit under the actual article.
I would have used a header
element for this usage but on 4.3.7 The header
element it is precised that
A header typically contains a group of introductory or navigational aids.
But they also say about the footer
element:
The primary purpose of these elements is merely to help the author write self-explanatory markup that is easy to maintain and style; they are not intended to impose specific structures on authors.
So why are they using the footer
element in the example? Wouldn't a header
element be more intuitive and semantic?
<section>
<h1>Comments</h1>
<article>
<header>
<p>Posted by: George Washington</p>
<p><time pubdate datetime="2009-10-10T19:10-08:00"></time></p>
</header>
<p>Yeah! Especially when talking about your lobbyist friends!</p>
</article>
<article>
<header>
<p>Posted by: George Hammond</p>
<p><time pubdate datetime="2009-10-10T19:15-08:00"></time></p>
</header>
<p>Hey, you have the same first name as me.</p>
</article>
</section>
Is there a particular reason for that?