摘要
HTML 定义元素 (<dfn>) 表示术语的一个定义。
HTML5 使用说明:
| 内容分类 | Flow content, phrasing content, palpable content. |
|---|---|
| 允许的内容 | Phrasing content, but no <dfn> element must be a descendant. |
| 标签省略 | 不允许,开始标签和结束标签都不能省略。 |
| 允许的父元素 | Any element that accepts phrasing content. |
| DOM 接口 | HTMLElement |
属性
该元素包括 全局属性。
在 HTML5 中,title 属性拥有特殊含义,见上文。
示例
下列示例是合法的HTML5。
<!-- Define "The Internet" --> <p><dfn id="def-internet">The Internet</dfn> is a global system of interconnected networks that use the Internet Protocol Suite (TCP/IP) to serve billions of users worldwide.</p>
在同一文档的后面:
<dl>
<!-- Define "World-Wide Web" and reference definition for "the Internet" -->
<dt>
<dfn>
<abbr title="World-Wide Web">WWW</abbr>
</dfn>
</dt>
<dd>The World-Wide Web (WWW) is a system of interlinked hypertext documents accessed on <a href="#def-internet">the Internet</a>.</dd>
</dl>
结果
标准
| 标准 | 状态 | 备注 |
|---|---|---|
| WHATWG HTML Living Standard <dfn> |
Living Standard | |
| HTML5 <dfn> |
Recommendation | |
| HTML 4.01 Specification <dfn> |
Recommendation |
浏览器兼容性
| 特性 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本支持 | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
| 特性 | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| 基本支持 | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |