HTML引用标签 (<q>)表示一个封闭的并且是短的行内引用的文本. 这个标签是用来引用短的文本,所以请不要引入换行符; 对于长的文本的引用请使用 <blockquote> 替代.
| Content categories | Flow content, phrasing content, palpable content. |
|---|---|
| Permitted content | Phrasing content. |
| Tag omission | 不允许,开始标签和结束标签都不能省略。 |
| Permitted parent elements | Any element that accepts phrasing content. |
| DOM interface | HTMLQuoteElement |
Note: 大多数现代的标准浏览器, 像 Mozilla Firefox, Opera, and Safari, 会在<q>标签的文本环绕封闭的引号.
有一些浏览器Some browsers, 像 Internet Explorer, 有可能不会在引用上面加上一些样式,但是可能会使用样式规则来替代.
有一些浏览器Some browsers, 像 Internet Explorer, 有可能不会在引用上面加上一些样式,但是可能会使用样式规则来替代.
属性
<q>标签拥有 全局属性.
cite- 这个属性的值是URL,意在指出被引用的文本的源文档或者源信息. 这个属性重在解释这个引用的参考或者是上下文.
示例
HTML 内容
<p>Everytime Kenny is killed, Stan will announce
<q cite="http://en.wikipedia.org/wiki/Kenny_McCormick#Cultural_impact">
Oh my God, you/they killed Kenny!
</q>.
</p>
说明
| Specification | Status | Comment |
|---|---|---|
| WHATWG HTML Living Standard <q> |
Living Standard | |
| HTML5 <q> |
Recommendation | |
| HTML 4.01 Specification <q> |
Recommendation | Initial definition |
浏览器兼容性
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
另见
- The
<blockquote>element for long quotations. - The
<cite>element for source citations.