?
This document uses PHP Chinese website manual Release
HTML 的 <dfn> 元素表示術(shù)語的定義實(shí)例。
內(nèi)容類別 | 流量內(nèi)容,措辭內(nèi)容,可觸及的內(nèi)容。 |
---|---|
允許的內(nèi)容 | 短語內(nèi)容,但沒有<dfn>元素必須是后代。 |
標(biāo)記遺漏 | 沒有,起始和結(jié)束標(biāo)簽都是強(qiáng)制性的。 |
允許父母 | 任何接受短語內(nèi)容的元素。 |
允許ARIA角色 | 任何 |
DOM界面 | HTML元素 |
這個(gè)元素的屬性包括全局屬性。
在 HTML5 中,該title
屬性具有特殊含義,如下所述。
所述<dfn>
元件標(biāo)記被定義的術(shù)語; 該術(shù)語的定義應(yīng)被周圍給予<p>
,<section>
或定義列表組(通常是<dt>
,<dd>
對(duì))。
定義的術(shù)語的確切值由以下規(guī)則確定:
如果<dfn>
元素有一個(gè)title
屬性,那么該屬性就是該屬性的值。
否則,如果它只包含一個(gè)<abbr>
帶有title
屬性的元素,那么該項(xiàng)就是該屬性的值。
否則,<dfn>
元素的文本內(nèi)容就是被定義的術(shù)語。
以下示例在 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>
規(guī)范 | 狀態(tài) | 評(píng)論 |
---|---|---|
WHATWG HTML生活標(biāo)準(zhǔn)該規(guī)范中'<dfn>'的定義。 | 生活水平 | |
HTML5該規(guī)范中'<dfn>'的定義。 | 建議 | |
HTML 4.01規(guī)范該規(guī)范中'<dfn>'的定義。 | 建議 |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |