HTML <cite> 标签用于标记被引用的创意作品的标题。它为创意作品、引用内容、书籍、网站、研究论文、博客点、绘画等提供参考或标题。在 <cite> 标签之间编写的内容在浏览器上以斜体形式呈现,并且可以在 HTML 文档中使用 CSS 覆盖它。
语法
<cite>...</cite>
属性
<cite> 标签的例子
在下面的例子中,我们将看到 cite 元素的用法,我们将见证 cite 标签的正常影响,文本在没有任何额外样式的情况下看起来如何。在另一个示例中,我们将根据需要装饰 cite 元素。
指定<cite> 标签元素
在以下示例中,我们将创建一个 HTML 文档,并使用 <cite> 标签来定义图像。它将生成一个输出,其中包含图像以及网页上显示的文本。
<!DOCTYPE html>
<html>
<body>
<ul>
<img src=
"https://www.qikepu.com/market/public/assets/images/logo.png?v=0.1" />
<p>七科普提供了编程的基础<cite>技术教程</cite>
</p>
</ul>
</body>
</html>
使用内部 CSS 设置 <cite> 标签元素样式
考虑另一种情况,我们将使用带有 interna CSS 样式的 cite 标签。
<!DOCTYPE html>
<html>
<style>
cite{
border: 1px solid lightgray;
padding: 3px;
border-radius: 5px;
background-color: gray;
margin: 2px;
}
</style>
<body>
<figure>
<h2>qikepu Pvt Ltd</h2>
<figcaption>教程:<cite>
<a href="http://www.qikepu.com">启科普</a>
</cite>提供了编程的基础技术教程 </figcaption>
</figure>
</body>
</html>
支持的浏览器
浏览器 | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
<cite> | Yes | Yes | Yes | Yes | Yes |