" 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."> Is pre a new tag in html5?-Front-end Q&A-php.cn

Is pre a new tag in html5?

青灯夜游
Release: 2021-12-15 18:36:45
Original
1906 people have browsed it

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

Is pre a new tag in html5?

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 in 
 tag 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 标签 对空行和 空格 进行控制
Copy after login

Is pre a new tag in html5?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!