For example of a blog-post or article.
<article>
<h1>header<h1>
<time>09-02-2011</time>
<author>John</author>
My article....
</article>
The author
tag doesn't exist though... So what is the commonly used HTML5 tag for authors?
Thanks.
(If there isn't, shouldn't there be one?)
According to the HTML5 spec, you probably want
address
.The spec further references
address
in respect to authors hereUnder 4.4.4
Under 4.4.9
All of which makes it seems that
address
is the best tag for this info.That said, you could also give your
address
arel
orclass
ofauthor
.Read more: http://dev.w3.org/html5/spec/sections.html#the-address-element
In HTML5 we can use some semantic labels that help organize the information regarding your type of content, but additional and related to the subject you can check schema.org. It is an initiative of Google, Bing and Yahoo that aims to help search engines to better understand websites through microdata attributes. Tu post podría tener el siguiente aspecto:
Both
rel="author"
and<address>
are designed for this exact purpose. Both are supported in HTML5. The spec tells us thatrel="author"
can be used on<link>
<a>
, and<area>
elements. Google also recommends its usage. Combining use of<address>
andrel="author"
seems optimal. HTML5 best affords wrapping<article>
headlines and bylines info in a<header>
like so:The
pubdate
attribute indicates that that is the published date.The
title
attributes are optional flyovers.The byline info can alternatively be wrapped in a
<footer>
within an<article>
If you want to add the hcard microformat, then I would do so like this:
How about microdata:
Google support for rel="author" is deprecated:
Use a Description List (Definition List in HTML 4.01) element.
From the HTML5 spec:
Authorship and other article meta information fits perfectly into this key:value pair structure:
An opinionated example:
As you can see when using the
<dl>
element for article meta information, we are free to wrap<address>
,<a>
and even<img>
tags in<dt>
and/or<dd>
tags according to the nature of the content and it's intended function.The
<dl>
,<dt>
and<dd>
tags are free to do their job -- semantically -- conveying information about the parent<article>
;<a>
,<img>
and<address>
are similarly free to do their job -- again, semantically -- conveying information regarding where to find related content, non-verbal visual presentation, and contact details for authoritative parties, respectively.If you were including contact details for the author, then the
<address>
tag is appropriate:But if it’s literally just the author’s name, there isn’t a specific tag for that. HTML doesn’t include much related to people.