过时
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 Listing Element ( <listing> ) renders text between the start and end tags without interpreting the HTML in between and using a monospaced font. The HTML 2 standard recommended that lines shouldn't be broken when not greater than 132 characters.

注意: Do not use this element.
  • It is deprecated since HTML 3.2 and was neither implemented by all browsers, nor in a consistent way. Even more it is obsoleted in HTML5 and may be rendered by conforming user-agents as the <pre> element, which will interpret the internal HTML!
  • Instead use the <pre> element or if semantically adequate the <code> element, eventually escaping the HTML ' < ' and ' > ' so that they don't get interpreted.
  • A monospaced font can also be obtained on a simple <div> element, by applying an adequate CSS style using monospace as the generic-font value in a font-family 特性。

属性

This element has no other attributes than the 全局属性 , common to all elements.

DOM 接口

This element implements the HTMLElement 接口。

Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
listing 弃用 Chrome 不支持 No Edge 不支持 No Firefox 不支持 No 注意事项
不支持 No 注意事项
注意事项 Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement 接口。
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement 接口。
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No

图例

不支持

不支持

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

见实现注意事项。

另请参阅

元数据

  • 最后修改: