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/del/index.html | |
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/del/index.html')
-rw-r--r-- | files/zh-cn/web/html/element/del/index.html | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/del/index.html b/files/zh-cn/web/html/element/del/index.html new file mode 100644 index 0000000000..ebb6162f64 --- /dev/null +++ b/files/zh-cn/web/html/element/del/index.html @@ -0,0 +1,109 @@ +--- +title: <del> +slug: Web/HTML/Element/del +tags: + - Element + - HTML + - HTML edits + - Web + - del +translation_of: Web/HTML/Element/del +--- +<p id="Summary">HTML的<strong><code><del></code></strong>标签表示一些被从文档中删除的文字内容。比如可以在需要显示修改记录或者源代码差异的情况使用这个标签。{{HTMLElement("ins")}}标签的作用恰恰于此相反:表示文档中添加的内容。</p> + +<p>这个标签通常(但不一定要)在文字上显示删除线。</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories">内容分类</a></th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#短语元素(Phrasing_content)">短语元素</a> 或者 <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#流式元素(Flow_content)">流式元素</a> 。</td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#透明内容模型(Transparent_content_model)">透明内容模型</a></td> + </tr> + <tr> + <th scope="row">标签省略</th> + <td>{{no_tag_omission}}</td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td>任意<a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#短语元素(Phrasing_content)">短语元素</a> </td> + </tr> + <tr> + <th scope="row">允许的 ARIA 角色</th> + <td>任意</td> + </tr> + <tr> + <th scope="row">DOM 接口</th> + <td>{{domxref("HTMLModElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="属性">属性</h2> + +<p><span style="line-height: 21px;">这个标签包含<a href="/zh-CN/docs/Web/HTML/Global_attributes">全局属性</a>。</span></p> + +<dl> + <dt>{{htmlattrdef("cite")}}</dt> + <dd>提供一个URI,其中的资源解释作出修改的原因(比如:根据某次会议讨论)。</dd> + <dt>{{htmlattrdef("datetime")}}</dt> + <dd>这个属性说明修改的时间和日期,这里的时间和日期格式要符合<a href="https://html.spec.whatwg.org/multipage/infrastructure.html#valid-date-string-with-optional-time">规范</a>。如果设置的值不符合该规范,那么它将没有任何意义。</dd> +</dl> + +<h2 id="示例">示例</h2> + +<pre class="brush: html"><p><del>This text has been deleted</del>, here is the rest of the paragraph.</p> +<del ><p >This paragraph has been deleted.</p ></del ></pre> + +<h3 id="结果">结果</h3> + +<p><del>This text has been deleted</del>, here is the rest of the paragraph.</p> + +<p><del>This paragraph has been deleted.</del></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', 'edits.html#the-del-element', '<del>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'edits.html#the-del-element', '<del>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML4.01', 'struct/text.html#h-9.4', '<del>')}}</td> + <td>{{Spec2('HTML4.01')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("html.elements.del")}}</p> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>{{HTMLElement("ins")}} 标签用来表示插入文本的内容</li> + <li>{{HTMLElement("s")}} 标签用来显示删除线,代表内容被删除了</li> +</ul> + +<div>{{HTMLRef}}</div> |