<q>:内嵌引用元素

<q> HTML 元素指示所包含的文本是简短的内嵌引用。大多数现代浏览器通过将文本括在引号中来实现这一点。此元素适用于不需要段落分隔符的简短引用;对于长引用,请使用 <blockquote> 元素。

¥The <q> HTML element indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. This element is intended for short quotations that don't require paragraph breaks; for long quotations use the <blockquote> element.

Try it

属性

¥Attributes

该元素包括 全局属性

¥This element includes the global attributes.

cite

该属性的值是一个 URL,指定所引用信息的源文档或消息。该属性旨在指向解释上下文或引用引用的信息。

示例

¥Examples

html
<p>
  According to Mozilla's website,
  <q cite="https://www.mozilla.org/en-US/about/history/details/">
    Firefox 1.0 was released in 2004 and became a big success.
  </q>
</p>

结果

¥Result

技术总结

¥Technical summary

内容类别 流量内容措辞内容,可触及的内容。
允许的内容 措辞内容.
标签遗漏 无,开始和结束标记都是强制性的。
允许的父级 任何接受 措辞内容 的元素。
隐式 ARIA 角色 generic
允许的 ARIA 角色 任何
DOM 接口 HTMLQuoteElement

规范

Specification
HTML Standard
# the-q-element

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看

¥See also