版权声明的语义HTML标记

前端之家收集整理的这篇文章主要介绍了版权声明的语义HTML标记前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当网站获得知识共享许可时,我使用 rel-license microformat.当一个网站是经常版权许可时,我有一个无聊的段落元素。
<p id="copyright">&copy; 2008 Example Corporation</p>

那里的id属性只是为了CSS造型的目的。我想知道是否有更好的方法标记更具语义的版权声明。这是都柏林核心元数据的工作吗?如果是这样,我该怎么办? (以前从来没有使用过都柏林核心)

一些网站主张在头元素中使用元标记

<Meta name="copyright" content="name of owner">

搜索引擎可能会看到这些内容,但不会替换页面本身的用户可见通知

解决方法

感谢欧文指出RDFa的方向,我想我现在有了解决方案:
<div id="footer" xmlns:dc="http://purl.org/dc/elements/1.1/">
<p id="copyright" property="dc:rights">&copy;
  <span property="dc:dateCopyrighted">2008</span>
  <span property="dc:publisher">Example Corporation</span>
</p>
</div>

根据情况,最好使用dc:creator而不是dc:publisher。从都柏林核心网站:

If the Creator and Publisher are the same,do not repeat the name in the Publisher area. If the nature of the responsibility is ambiguous,the recommended practice is to use Publisher for organizations,and Creator for individuals. In cases of lesser or ambiguous responsibility,other than creation,use Contributor.

我还将添加一个Meta标签到我的头元素的搜索引擎,不支持RDFa。

<Meta name="copyright" content="&copy; 2008 Example Corporation" />
原文链接:https://www.f2er.com/html/233501.html

猜你在找的HTML相关文章