What does pre mean in html5?

WBOY
Release: 2021-12-22 10:36:38
Original
5439 people have browsed it

In HTML5, pre is used to represent pre-formatted text. The text enclosed in the pre tag usually retains spaces and line breaks, that is, the text layout and format are presented intact. A common application is to represent computer source code, with the syntax "

source code
Copy after login
".

What does pre mean in html5?

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What does pre mean in HTML5?

##
 tag can define pre-formatted text. <p></p>Text enclosed in <pre class="brush:php;toolbar:false"> tag elements usually preserves spaces and newlines. <p></p>Use the <pre class="brush:php;toolbar:false">
Copy after login
tag to display the wrapped text layout and format intact. It is one of the very useful tags. That is to say, what you input will be output unchanged, including the spaces you input. There is no need to express spaces or carriage returns with
. A common application of the

tag is to use to represent the computer's source code. Text enclosed in a pre element usually preserves whitespace and newlines. The text will also be rendered as a fixed-width font.

The example is as follows:

<html>
<head> 
<meta charset="utf-8"> 
<title>123</title> 
</head>
<body>
<pre class="brush:php;toolbar:false">
此例演示如何使用 pre 标签
对空行和    空格
进行控制
Copy after login

此例演示如何使用 pre 标签 对空行和 空格 进行控制

Output result:

What does pre mean in html5?

Recommended tutorial: "

html video tutorial"

The above is the detailed content of What does pre mean 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template