我应该使用哪个HTML5标记来标记作者的姓名? [英] Which HTML5 tag should I use to mark up an author’s name?

查看:144
本文介绍了我应该使用哪个HTML5标记来标记作者的姓名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如博文或文章。

<article>
<h1>header<h1>
<time>09-02-2011</time>
<author>John</author>
My article....
</article>

虽然作者标签不存在...那么作者常用的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?)

推荐答案

HTML5有作者链接类型

<a href="http://johnsplace.com" rel="author">John</a>

这里的弱点是它需要在某种链接上,但是如果你有这种链接那么此处对替代方案的长期讨论。如果您没有链接,那么只需使用类属性即可:

The weakness here is that it needs to be on some sort of link, but if you have that there's a long discussion of alternatives here. If you don't have a link, then just use a class attribute, that's what it's for:

<span class="author">John</span>

这篇关于我应该使用哪个HTML5标记来标记作者的姓名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆