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/"
广告