问题描述
例如博客文章或文章.
<article>
<h1>header<h1>
<time>09-02-2011</time>
<author>John</author>
My article....
</article>
author 标签并不存在……那么,作者常用的 HTML5 标签是什么?谢谢.
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?)
推荐答案
两者 rel="author" 和 <address> 正是为此目的而设计的.两者都在 HTML5 中受支持.规范告诉我们 rel="author" 可用于 <link> <a> 和 <area> 元素.Google 还推荐 用法.结合使用 <address> 和 rel="author" 似乎是最佳选择.HTML5 最适合包装 <article> <header> 中的标题和署名信息,如下所示:
Both rel="author" and <address> are designed for this exact purpose. Both are supported in HTML5. The spec tells us that rel="author" can be used on <link> <a>, and <area> elements. Google also recommends its usage. Combining use of <address> and rel="author" seems optimal. HTML5 best affords wrapping <article> headlines and bylines info in a <header> like so:
<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>
pubdate属性表明这是发布日期.The
pubdateattribute indicates that that is the published date.title属性是可选的天桥.署名信息也可以包装在 <footer>">
<文章>The byline info can alternatively be wrapped in a
<footer>within an<article>如果你想添加 hcard 微格式,我会这样做就像这样:
If you want to add the hcard microformat, then I would do so like this:
<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>这篇关于我应该使用哪个 HTML5 标签来标记作者姓名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
The End




大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)