q 元素
q 元素用于定义简短的引用, 如句子中的引用, 引用的内容必须来自另一个引用源. 如果引用源有一个地址的话, 还可以通过 q 元素的 cite 属性, 来提供内容的引用源. 如果 q 元素中的文本与主要文本使用不同的语言, 则要使用 lang 属性来注明. 如:
<p>The W3C page <cite>About W3C</cite> says the W3C's
mission is <q cite="https://www.w3.org/Consortium/">To lead the
World Wide web to its full potential by developing protocols and
guidelines that ensure long-term growth for the Web</q>. I
disagree with this mission.</p>
默认情况下, 浏览器会为 q 元素引用的内容加上双引号. 运行结果如图 222 所示:
图 2-22 q 元素
说明:
通过可选的 cite 属性, 可以为 blockquote 和 q 元素提供内容来源的 URL, 尽管浏览器不会将 cite 的 URL 呈现给用户, 但理论上讲, 该属性对搜索引擎或收集引用文本的自动化工具是可见的.
来源: https://www.2cto.com/kf/201804/736423.html