diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/dfn | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/dfn')
| -rw-r--r-- | files/zh-cn/web/html/element/dfn/index.html | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/dfn/index.html b/files/zh-cn/web/html/element/dfn/index.html new file mode 100644 index 0000000000..54ad800e1d --- /dev/null +++ b/files/zh-cn/web/html/element/dfn/index.html @@ -0,0 +1,166 @@ +--- +title: <dfn> +slug: Web/HTML/Element/dfn +translation_of: Web/HTML/Element/dfn +--- +<h2 id="摘要">摘要</h2> + +<p><em>HTML 定义元素</em> (<strong><dfn></strong>) 表示术语的一个定义。</p> + +<div class="note"><strong>HTML5 使用说明:</strong> + +<ul> + <li><code><dfn></code> 元素标记了被定义的术语;术语定义应当在 {{HTMLElement("p")}}, {{HTMLElement("section")}}或定义列表 (通常是{{HTMLElement("dt")}}, {{HTMLElement("dd")}} 对)中给出。</li> + <li>被定义术语的值由下列规则确定: + <ol> + <li>如果 <code><dfn></code> 元素有一个 <code><strong>title</strong></code> 属性,那么该术语的值就是该属性的值。</li> + <li>否则,如果它仅包含一个 {{HTMLElement("abbr")}} 元素,该元素拥有 {{htmlattrxref("title", "abbr")}} 属性,那么该术语的值就是该属性的值。</li> + <li>否则,<code><dfn></code> 元素的文本内容就是该术语的值。</li> + </ol> + </li> +</ul> +</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories" title="HTML/Content_categories">内容分类</a></th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">Flow content</a>, <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>, palpable content.</td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">Phrasing content</a>, but no {{HTMLElement("dfn")}} element must be a descendant.</td> + </tr> + <tr> + <th scope="row">标签省略</th> + <td>{{no_tag_omission}}</td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td>Any element that accepts <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">phrasing content</a>.</td> + </tr> + <tr> + <th scope="row">DOM 接口</th> + <td>{{domxref("HTMLElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="属性">属性</h2> + +<p><span style="line-height: 21px;">该元素包括 </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">全局属性</a>。</p> + +<p>在 HTML5 中,<code><strong>title</strong></code> 属性拥有特殊含义,见上文。</p> + +<h2 id="示例">示例</h2> + +<p>下列示例是合法的HTML5。</p> + +<pre class="brush: html"><!-- 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> +</pre> + +<p>在同一文档的后面:</p> + +<pre class="brush: html"><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> +</pre> + +<h3 id="结果">结果</h3> + +<p>{{ EmbedLiveSample('Examples', '600', '150', '', 'Web/HTML/Element/dfn') }}</p> + +<h2 id="Specifications" name="Specifications">标准</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">标准</th> + <th scope="col">状态</th> + <th scope="col">备注</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-dfn-element', '<dfn>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-dfn-element', '<dfn>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML4.01', 'struct/text.html#h-9.2.1', '<dfn>')}}</td> + <td>{{Spec2('HTML4.01')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>特性</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>基本支持</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>特性</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>基本支持</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoMobile("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>定义列表的相关元素:{{HTMLElement("dl")}}, {{HTMLElement("dt")}}, {{HTMLElement("dd")}}</li> + <li>{{HTMLElement("abbr")}}</li> +</ul> + +<p>{{HTMLRef}}</p> |
