且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我应该使用哪个HTML5标记来标记作者的姓名?

更新时间:2023-11-10 23:52:10

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>