Master the difference between BR and P tags through examples

Time:2022-5-6

Use of newline marker < br >
Line feed tag < br > is a tag with no end. As long as the < br > tag is used anywhere in the HTML file, when the file is displayed in the browser, the text after the location will be displayed on the next line, and the < br > tag is a tag for line feed!
Please note that! In general text files, line breaks are generated by pressing the Enter key on the keyboard, but it is useless to press the Enter key in HTML files. We must use a specific tag < br > to make them generate line breaks! Example:
The following are the references:
<html>
<head>
< title > br use of tags < / Title >
</head>
<body>
Qingpingtiao < br >
< br > fancy clothes
The spring breeze blows the sill, and the dew is thick, < br >
< br >
I’ll meet you at Yaotai< br>
</body>
</html>

See what effect will appear ~!
Someone asked, what should I do to center the whole poem on the page? If the implementation is centered, we can use the < p align = center > content < / P > we have learned before to realize it!
Example:
The following are the references:
<html>
<head>
< title > br use of tags < / Title >
</head>
<body>
< p align = center > level adjustment < br >
< br > fancy clothes
The spring breeze blows the sill, and the dew is thick, < br >
< br >
I’ll meet you at Yaotai< br>
</p>
</body>
</html>

================================================

Use of paragraph markers < p >
The text identified by the < p > mark represents the text of the same paragraph. In the browser, in addition to line breaks, the text of different paragraphs is sometimes separated by a blank line to distinguish different paragraphs of text. Its syntax is as follows:
<p>Writing</p>
However, in general applications, a < p > mark is often added only after the text to be divided into paragraphs Example:
The following are the references:
<html>
<head>
</head>
< title > < p > use of tags < / Title >
</head>
<body>
Qingpingtiao < p >
Clouds think of clothes, flowers think of looks, < p >
The spring breeze blows the sill, and the dew is thick, < p >
< p >
Will meet at the foot of the moon at Yaotai, < p >
</body>
</html>

So what’s the difference between < br > and < p >? Generally speaking, when they are in the branch, they get a better share than the bank
<p>The line spacing is relatively large! We can take a look at:
The following are the references:
<html>
<head>
</head>
< title > < p > use of tags < / Title >
</head>
<body>
Qingpingtiao < br >
< br > fancy clothes
The spring breeze blows the sill, and the dew is thick, < p >
< p >
Will meet at the foot of the moon at Yaotai, < p >
</body>
</html>

So you can see the effect. Do you see it?