gpt4 book ai didi

html - 版权声明的语义 HTML 标记

转载 作者:技术小花猫 更新时间:2023-10-29 12:04:28 26 4
gpt4 key购买 nike

当网站获得知识共享许可时,我使用 rel-license microformat .当网站获得常规版权许可时,我有一个无聊的段落元素。

<p id="copyright">&copy; 2008 Example Corporation</p>

那里的 id 属性仅用于 CSS 样式目的。我想知道是否有更好的方法来标记更具语义的版权声明。这是 Dublin Core 元数据的工作吗?如果是这样,我该怎么做? (我以前从未使用过 Dublin Core。)

有些网站提倡在head元素中使用meta标签:

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

这可能会被搜索引擎看到,但不会取代页面本身上用户可见的通知。

最佳答案

感谢 Owen 为我指明了 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.

我还将为尚不支持 RDFa 的搜索引擎在我的 head 元素中添加一个元标记。

<meta name="copyright" content="&copy; 2008 Example Corporation" />

关于html - 版权声明的语义 HTML 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/254613/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com