我有一些分享/点赞按钮以及我的 Google+ 个人资料图标。
将它们放在页面底部的 footer
元素中是否正确?
最佳答案
footer
element适合此类链接。
这是一个非常简单的决定,因为此类链接显然不是部分主要内容的一部分,因此只有 footer
或 header
留下可能的候选人。这里 footer
的定义似乎更接近(强调我的):
[…] typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like.
分享/喜欢链接
当分享/点赞链接用于分享/点赞文章时(例如博客文章),请使用文章
部分的页脚
。
当分享/点赞链接用于分享/点赞整个网站时,请使用 body
分区根的 footer
。
<body>
<article>
<footer><!-- for links applying to this article --></footer>
</article>
<footer><!-- for links applying to the whole page resp. site --></footer>
</body>
个人资料链接
如果文章的作者与页面/网站的作者不同,请相应地放置个人资料链接。
如果链接的个人资料提供了与您联系的方式,您可以使用 address
element另外。
<footer>
<address><a>…</a></address>
</footer>
您可能想使用author
resp. publisher
link type .
关于HTML5语义元素: share/like buttons in footer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22286865/