HTML - <cite> 標籤



HTML <cite> 標籤用於標記被引用的創意作品的標題。它提供對創意作品、引用內容、書籍、網站、研究論文、部落格文章、繪畫等的參考或標題。<cite>標籤之間編寫的文字在瀏覽器中以斜體形式呈現,並且可以使用 HTML 文件中的 CSS 來覆蓋。

語法

<cite>...</cite>

屬性

HTML cite 標籤支援 HTML 的全域性事件屬性。

HTML cite 標籤示例

在下面的示例中,我們將看到 cite 元素的用法,我們將看到 cite 標籤的正常影響,以及在沒有任何額外樣式的情況下文字的外觀。在另一個示例中,我們將根據需要裝飾 cite 元素。

指定 cite 元素

在下面的示例中,我們正在建立一個 HTML 文件並使用 <cite> 標籤來定義影像。它將生成一個輸出,其中包含影像以及在網頁上顯示的文字。

<!DOCTYPE html>
<html>
<body>
   <ul>
      <img src=
"https://tutorialspoint.tw/market/public/assets/images/logo.png?v=0.1" />
      <p>This logo Created by the <cite>Tutorialspoint</cite>
      </p>
   </ul>
</body>
</html>

使用內聯 CSS 樣式化 cite 元素

考慮另一種情況,我們將使用帶有內聯 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>TutorialsPoint Pvt Ltd</h2>
        <figcaption>Fist Choice on Tutorials:<cite>
         <a href="https://tutorialspoint.tw">TutorialsPoint</a>
      </cite>Simply Easy Learning </figcaption>
    </figure>
</body>

</html>

支援的瀏覽器

標籤 Chrome Edge Firefox Safari Opera
cite
html_tags_reference.htm
廣告