Sab*_*ina 12 html html5 semantic-markup semantics
这是一个主要是语义的问题.我想在网站上放置带有版权的图片.我知道数字和figcaption元素,但figcaption似乎不是最好的标签.这是我需要的标题.如果我有这样的图像:
<figure>
<img src="img/content/preview.jpg" alt="Alttext für das Bild" />
<figcaption>Caption goes here</figcaption>
</figure>
Run Code Online (Sandbox Code Playgroud)
我在哪里放版权?
编辑:版权文字必须可见.
uno*_*nor 17
版权声明应包含在一个small元素中:
[...]通常包含免责声明,警告,法律限制或版权.
如果版权声明适用于切片内容元素的内容(例如,article),包括small在一个元素footer元素属于该切片元素:
A
footer通常包含关于其部分的信息,例如谁写了它,链接到相关文档,版权数据等.
如果它适用于整个页面,则可以将该small元素包含在footer属于该元素的元素中body(即不嵌套在sectioning元素中).
<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>
Run Code Online (Sandbox Code Playgroud)
如果版权声明包含指向许可的链接(或更详细地解释术语的页面),请使用license链接类型.
但请注意:此许可证将适用于页面的主要内容(通过main元素指示).
figure是一个切片根元素,这意味着footer(和header)可以应用于它:
该
footer元素代表一个页脚其最近的祖先切片内容或切片的根元素.
所以你可以在:中包含一个footer元素(包含一个small元素)figure:
<a rel="license" href="/license.html">Usage rights</a>
Run Code Online (Sandbox Code Playgroud)
从结构上讲,此版权声明适用于该figure元素的全部内容.(它也可以包含footer在figcaption.)
(如果你有一个链接到许可证,只使用license,如果该链接类型figure是主要内容,而应该没有其他的主要内容不是在相同的许可证授权.)