" tag element usually retains spaces and newlines; the "width" attribute of the pre tag is obsolete in HTML4.01 and no longer in HTML5 support.">
pre is not a new tag in html5. The pre tag is used to define pre-formatted text. The text enclosed in the "
" tag element usually retains spaces and newlines; the "width" attribute of the pre tag is obsolete in HTML4.01 and is not included in HTML5. Support again.Copy after login
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
pre is not a new tag in html5.
The
tag defines preformatted text. Text enclosed intag elements usually preserves spaces and newlines. The text will also be rendered as a fixed-width font.tags support an attribute "width" that defines the maximum number of characters per line (usually 40, 80, or 132).ButIn HTML 4.01, the "width" attribute is obsolete and cannot be used. HTML5 does not support the "width" attribute.
Example:
此例演示如何使用 pre 标签 对空行和 空格 进行控制Copy after login
此例演示如何使用 pre 标签 对空行和 空格 进行控制
Recommended tutorial: "html video tutorial"
The above is the detailed content of Is pre a new tag in html5?. For more information, please follow other related articles on the PHP Chinese website!