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/"
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP