Home > Web Front-end > HTML Tutorial > Master the difference between BR and P tags through examples_HTML/Xhtml_Web page production

Master the difference between BR and P tags through examples_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:44:24
Original
1713 people have browsed it

Usage of newline mark

Line break tag
is a tag without an end. As long as the
tag is used anywhere in the HTML file, when the file is displayed in the browser, the text after this position will be displayed on the next line. The
The mark is the mark that acts as a line break!
Please note! In ordinary text files, just pressing the Enter key on the keyboard will produce a line break, but pressing the Enter key in an HTML file is useless. We must use a specific mark
to make them produce line breaks! example:
The following is the quoted content:


Use of br tag


Qing Ping Diao

Clouds think of clothes, flowers think of faces,

The spring breeze blows on the threshold and the dew is thick,

If we hadn’t met on the top of the jade mountain,

we would have met under the moon at Yaotai.



Let’s see what effect it will have~!
Someone wants to ask how to center the entire poem on the page? If we want to achieve centering, we can use the

content

we learned before to achieve it!
Example:
The following is the quoted content:


Use of br tag


Qing Ping

The clouds think of the clothes and the flowers think of the face,

The spring breeze blows on the threshold and the dew is strong,

If we hadn't met at the top of the jade mountain,

we would have met under the moon on Yaotai .




================================================== =
Usage of paragraph mark


and the text identified by the

tag represent the text of the same paragraph. In the browser, in addition to line breaks, different paragraphs of text are sometimes separated by a line of blank space to distinguish different paragraphs of text. The syntax is as follows:

Text


But in general In applications, usually only the previous

mark is added after the text to be divided into paragraphs. Example:
The following is the quoted content:



<p>Use of tags</p>


Qing Ping Diao


Clouds think of clothes and flowers think of face,


The spring breeze blows on the threshold and the dew is strong,


If we hadn’t met at the top of the jade mountain,


would have gone to Yaotai meets the moon,



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