In the layout of web pages, text is often segmented and line-wrapped. These two operations are implemented by the
tag and the
tag.
1.
-Paragraph tag
p is the first letter of the English word "paragraph", which is used to define a section of text in a web page.
usually appears in pairs.
2.
-Line break tag
br is the abbreviation of the English word "break". Its function is to force text to a new line in a paragraph.
is a self-closing tag. The standard writing method is
.
tags and
tags both cause text to wrap. The difference is that their spacing is different. The spacing between segments using the
tag is larger and the levels are clearer.
Example:
1
2
3
4
5
6
7
8
9
10
11
/head>
html text content
html text content
html text content
html text content p>