例如博客文章或文章。
<article>
<h1>header<h1>
<time>09-02-2011</time>
<author>John</author>
My article....
</article>
The author
但标签不存在...那么作者常用的 HTML5 标签是什么?
谢谢。
(如果没有的话,难道不应该有吗?)
Both rel="author" http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-author and <address> http://dev.w3.org/html5/spec/Overview.html#the-address-element正是为此目的而设计的。 HTML5 中支持两者。规范告诉我们rel="author" http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-author可以用在<link> http://dev.w3.org/html5/spec/Overview.html#the-link-element <a>
, and <area>
元素。谷歌也推荐 http://www.google.com/support/webmasters/bin/answer.py?answer=1408986 its usage http://www.blindfiveyearold.com/how-to-implement-rel-author。结合使用<address>
and rel="author"
似乎是最佳的。 HTML5 最适合包装<article> http://dev.w3.org/html5/spec/Overview.html#the-article-element标题和署名信息<header>
像这样:
<article>
<header>
<h1 class="headline">Headline</h1>
<div class="byline">
<address class="author">By <a rel="author" href="/author/john-doe">John Doe</a></address>
on <time pubdate datetime="2011-08-28" title="August 28th, 2011">8/28/11</time>
</div>
</header>
<div class="article-content">
...
</div>
</article>
如果您想添加卡片微格式 http://microformats.org/wiki/hcard,那么我会这样做:
<article>
<header>
<h1 class="headline">Headline</h1>
<div class="byline vcard">
<address class="author">By <a rel="author" class="url fn n" href="/author/john-doe">John Doe</a></address>
on <time pubdate datetime="2011-08-28" title="August 28th, 2011">on 8/28/11</time>
</div>
</header>
<div class="article-content">
...
</div>
</article>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)