过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
HTML Example Element
(
<xmp>
) renders text between the start and end tags without interpreting the HTML in between and using a monospaced font. The HTML2 specification recommended that it should be rendered wide enough to allow 80 characters per line.
<pre>
element or, if semantically adequate, the
<code>
element instead. Note that you will need to escape the '
<
' character as '
<
' to make sure it is not interpreted as markup.
monospace
as the generic-font value for the
font-family
特性。
This element has no other attributes than the 全局属性 , common to all elements.
This element implements the
HTMLElement
接口。
Implementation note:
up to Gecko 1.9.2 inclusive, Firefox implements the
HTMLSpanElement
interface for this element.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
xmp
弃用
|
Chrome 完整支持 Yes | Edge 完整支持 12 |
Firefox
完整支持
Yes
注意事项
|
IE 完整支持 Yes | Opera 完整支持 Yes | Safari 完整支持 Yes | WebView Android 完整支持 Yes | Chrome Android 完整支持 Yes |
Firefox Android
完整支持
Yes
注意事项
|
Opera Android 完整支持 Yes | Safari iOS 完整支持 Yes | Samsung Internet Android 完整支持 Yes |
完整支持
弃用。不要用于新网站。
见实现注意事项。
<pre>
and
<code>
elements to be used instead.
<plaintext>
and
<listing>
elements, similar to
<xmp>
but also obsolete.