简体   繁体   English

版权声明的语义HTML标记

[英]Semantic HTML markup for a copyright notice

When a web site is licensed under Creative Commons, I use the rel-license microformat . 当网站根据知识共享许可时,我使用rel-license微格式 When a web site is licensed under regular copyright, I have a boring paragraph element. 当一个网站按照常规版权许可时,我有一个无聊的段落元素。

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

That id attribute on there is just for CSS styling purposes. 那个id属性只是用于CSS样式的目的。 I'm wondering if there's some better way to markup a copyright notice that is more semantic. 我想知道是否有更好的方法来标记更具语义的版权声明。 Is this a job for Dublin Core metadata? 这是Dublin Core元数据的工作吗? If so, how do I go about it? 如果是这样,我该怎么做呢? (I've never used Dublin Core before.) (我之前从未使用过Dublin Core。)

Some web sites advocate using a meta tag in the head element: 一些网站主张在head元素中使用元标记:

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

Which might be seen by search engines, but doesn't replace the user-visible notice on the page itself. 搜索引擎可能会看到这一点,但不会替换页面本身的用户可见通知。

Thanks to Owen for pointing me in the direction of RDFa, I think I've got the solution now: 感谢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>

Depending on the situation, it might be better to use dc:creator instead of dc:publisher. 根据具体情况,最好使用dc:creator而不是dc:publisher。 From the Dublin Core web site: 来自都柏林核心网站:

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. 如果责任的性质不明确,建议的做法是将Publisher用于组织,将Creator用于个人。 In cases of lesser or ambiguous responsibility, other than creation, use Contributor. 如果责任较轻或模棱两可,除了创建之外,请使用贡献者。

I will also be adding a meta tag to my head element for search engines that don't support RDFa yet. 我还将为我的head元素添加一个元标记,用于尚不支持RDFa的搜索引擎。

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

Have you taken a look at RDFa ? 你看过RDFa了吗? It was recently accepted as a W3C recommendation. 最近被接受为W3C推荐。 I mention that just in case you want to take a look at other aspects of semantic structure it recommends. 我提到,以防万一你想看看它推荐的语义结构的其他方面。 The licensing part is the same as the format you currently use. 许可部分与您当前使用的格式相同。 (So in that sense to answer your question, I think you're handling it correctly, assuming people adopt RDFa) (所以在这个意义上回答你的问题,我认为你正确处理它,假设人们采用RDFa)

For lazy people who don't want to click links: 对于不想点击链接的懒人:

// RDFa recomendation and rel=license microformat
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
  a Creative Commons License
</a>

Probably the most semantically correct way to mark it up is with a definition list. 标记它的最正确语法可能是定义列表。

<dl id="copyright">
    <dt title="Copyright">&copy;</dt>
    <dd>2008 Example Corporation</dd>
</dl>

Why not use the CC format, but indicate that no rights are granted? 为什么不使用CC格式,但表明没有授予权限?

In any case, the main problem with the use of the CC formats is that people do not clearly identify which elements of the webpage that they appear on they apply to. 在任何情况下,使用CC格式的主要问题是人们无法清楚地识别出他们所适用的网页的哪些元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM