HTML<q>标签


HTML中<q>标签用于指定一个引文短语。引号会嵌入到<q>标签(即引号)内部设置的文本周围。

以下为属性——

  • cite: 它设置了此引文的来源网址。

现在我们来看一个使用<q>标签的示例——

示例

 在线实例

<!DOCTYPE html>
<html>
<body>
<h2>Thoughts</h2>
   <p>Warren Buffett quoted,
   <q>It's better to hang out with people better than you. Pick out associates whose behavior is
   better than yours and you'll drift in that direction. </q></p>
   <p>Bill Gates quoted,
   <q>Your most unhappy customers are your greatest source of learning.</q></p>
</body>
</html>

输出

在上面的示例中,我们使用HTML中的<q>标签设置了一些引文——

<p>Warren Buffett quoted,
<q>It's better to hang out with people better than you. Pick out associates whose behavior is better than yours and you'll drift in that direction. </q>

如上所示,我们已经使用<q>标签设置此引文。输出显示<q>标签会自动在引文周围添加短引号。

更新日期:2020 年 6 月 29 日

73 次浏览

开启你的 职业生涯

完成课程后获得认证

开始
广告
© . All rights reserved.