如何在html中标记图片的版权?

2024-01-10

这主要是一个语义问题。我想把有版权的图片放在网站上。我知道figure和figcaption元素,但figcaption似乎不是最好的标签。这是我也需要的标题。 如果我有这样的图像:

<figure>
  <img src="img/content/preview.jpg" alt="Alttext für das Bild" />
  <figcaption>Caption goes here</figcaption>
</figure>

我把版权放在哪里?

编辑:版权文本必须可见。


一般来说

版权声明应包含在small element https://www.w3.org/TR/2017/REC-html52-20171214/textlevel-semantics.html#the-small-element:

[…]通常包含免责声明、警告、法律限制或版权.

如果版权声明适用于分段内容元素的内容(例如,article),包括small中的元素footer element https://www.w3.org/TR/2017/REC-html52-20171214/sections.html#the-footer-element属于此分段元素:

A footer通常包含信息关于它的部分,例如谁写的,相关文档的链接,版权数据,等等。

如果它适用于整个页面,您可以包括small中的元素footer属于body(即不嵌套在分段元素中)。

<body>

 <article>
    <footer>
      <small><!-- if the license applies to the content of this article --></small>
    </footer>
  </article>

  <footer>
    <small><!-- if the license applies to the content of the whole page --></small>
  </footer>

</body>

当它包含许可证链接时

如果版权声明包含指向许可证的链接(或指向更详细解释条款的页面)的链接,请使用license链接类型 https://www.w3.org/TR/2017/REC-html52-20171214/links.html#link-type-license, e.g.:

<a rel="license" href="/license.html">Usage rights</a>
<a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a>

但请注意:此许可证将(仅)适用于整个主要内容页面的(由main element https://www.w3.org/TR/2017/REC-html52-20171214/grouping-content.html#the-main-element).

在你的情况下

figure is a 切根 https://www.w3.org/TR/2017/REC-html52-20171214/sections.html#sectioning-roots元素,这意味着footer (and header) 可以应用到它:

The footer元素代表页脚为其最近的祖先切片内容或切分根元素.

所以你可以包括一个footer元素(包含一个small元素)中figure:

<figure>
  <img src="img/content/preview.jpg" alt="Alttext für das Bild" />
  <footer><small><!-- copyright noice --></small></footer>
  <figcaption>Caption goes here</figcaption>
</figure>

从结构上讲,本版权声明适用于figure元素。 (也可以包括footer in the figcaption.)

(如果您有许可证链接,则仅使用license链接类型如果是这样figure是主要内容,没有其他主要内容not在同一许可证下获得许可。)

留下纯 HTML:结构化数据

通过使用结构化数据(例如 RDFa、微数据),您可以更加具体。这将允许为网页的每个部分指定不同的许可证。网站管理员 SE 答案中的示例。 https://webmasters.stackexchange.com/a/121902/17633

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在html中标记图片的版权? 的相关文章