HTML cite 屬性


<q> 元素的 cite 屬性用於設定引文的源 URL。源不會顯示在網頁上,但對螢幕閱讀器很有用。

讓我們現在看一個實現 <q> 元素的 cite 屬性的示例 −

示例

 線上演示

<!DOCTYPE html>
<html>
<body>
<h2>What we want?</h2>
<p>PETA states,
   <q cite="https://legacy.peta.org/why-give/">We are the largest animal rights organization in the 
   world, with more than 6.5 million members and supporters worldwide. We need your continued 
   support in order to stop cruelty to animals wherever it occurs.</q>
</p>
</body>
</html>

輸出

在上面的示例中,我們已經使用 <q> 標記設定了一個引文 −

<p>PETA states,
<q cite="https://legacy.peta.org/why-give/">We are the largest animal rights organization in the world, with more than 6.5 million members and supporters worldwide. We need your continued support in order to stop cruelty to animals wherever it occurs.
</q>

由於該引文取自官方網站,因此始終有必要透過引用或使用 cite 屬性來註明出處 −

cite="https://legacy.peta.org/why-give/"

更新於:11-6-2020

129 次瀏覽

開啟你的 事業

完成課程即可獲得認證

開始
廣告
© . All rights reserved.