返回

Cite

<cite>:HTMLElement

cite元素代表作品的标题(例如,书,论文,论文,诗歌,乐谱,歌曲,剧本,电影,电视节目,游戏,雕塑,绘画,剧院 制作,戏剧,歌剧,音乐剧,展览,法律案例报告,计算机程序等)。 这可以是被详细引用或引用(即引用)的作品,也可以只是顺带提及的作品。

人的名字不是作品的标题,即使人们称其为一件作品,因此也不得使用该元素来标记人的名字。 (在某些情况下,b元素可能适合于名称;例如,在八卦文章中,名人的名字是用不同样式呈现的关键字来引起人们注意的。在其他情况下,如果确实需要该元素,则 可以使用span元素。)

例子

下一个示例显示cite元素的典型用法:

<p>My favorite book is <cite>The Reality Dysfunction</cite> by
Peter F. Hamilton. My favorite comic is <cite>Pearls Before
Swine</cite> by Stephan Pastis. My favorite track is <cite>Jive
Samba</cite> by the Cannonball Adderley Sextet.</p>

这是正确的用法:

<p>According to the Wikipedia article <cite>HTML</cite>, as it
stood in mid-February 2008, leaving attribute values unquoted is
unsafe. This is obviously an over-simplification.</p>

以下内容使用不正确,因为此处的cite元素包含的内容远远超出作品的标题:

<!-- do not copy this example, it is an example of bad usage! -->
<p>According to <cite>the Wikipedia article on HTML</cite>, as it
stood in mid-February 2008, leaving attribute values unquoted is
unsafe. This is obviously an over-simplification.</p>

cite不是引号(引号适合q元素)

这是不正确的用法,因为cite不是引号:

<p><cite>This is wrong!</cite>, said Ian.</p>
这也是不正确的用法,因为一个人不是工作:

<p><q>This is still wrong!</q>, said <cite>Ian</cite>.</p>
正确用法不使用cite元素:

<p><q>This is correct</q>, said Ian.</p>
如上所述,b元素可能与在某些类型的文档中将名称标记为关键字有关:

<p>And then <b>Ian</b> said <q>this might be right, in a
gossip column, maybe!</q>.</p>