xmp is not a new tag in html5, but a tag deleted from html5; the content between xmp tags will not be parsed as html, and a fixed-width font can be used to display the content in the tag, but Since "HTML 3.2", this element has been deprecated, and not all browsers implement this element. In HTML5, the "
" and "" elements can be used to replace this element.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
xmp is not a new tag in html5
HTML example element (
Note: Do not use this element.
It has been deprecated since HTML 3.2, and not all browsers implement this element, nor in a consistent manner. It has been completely removed from HTML5.
If you use the
element, or use the element to satisfy the semantics, you can escape HTML's < and > so that the HTML will not be interpreted.
You can also simply implement a monospace font in any element by setting monospace as the universal font value in the CSS font-family property.
This feature is obsolete. While it may still work in some browsers, its use is discouraged as it may be removed at any time. Try to avoid using it.
Extended knowledge:
You can use the
and elements to replace this element.
and elements, similar to , but also deprecated.
(Learning video sharing: css video tutorial, html video tutorial)
The above is the detailed content of Is xmp a new tag in html5?. For more information, please follow other related articles on the PHP Chinese website!