<br />Use of line break tag<br>The line break tag<br> is a tag without an 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 that position will be displayed on the next line. The <br> tag is the line break tag! Please note! In a normal text file, just pressing the Enter key on the keyboard will create a line break. However, pressing the Enter key is useless in HTML files. We must use a specific tag <br> to make them create line breaks! example: The following is the quoted content: <html> <head> <title>Use of br tag</title> </head> <body> Qingping Diao<br> The clouds are like clothes, the flowers are like faces, The spring breeze blows through the threshold, and the flowers are in full bloom. If we had not seen each other on the top of the Jade Mountain, We will meet under the moon at Yaotai. <br> </body> </html> See what effect will appear~! Someone may ask how to center the entire poem on the page? If we want to achieve centering, we can use the <p align=center>content</p> we learned before to achieve it! example: The following is the quoted content: <html> <head> <title>Use of br tag</title> </head> <body> <p align=center>Qingping Diao<br> The clouds are like clothes, the flowers are like faces, The spring breeze blows through the threshold, and the flowers are in full bloom. If we had not seen each other on the top of the Jade Mountain, We will meet under the moon at Yaotai. <br> </p> </body> </html> ================================================ Use of paragraph tag <p> The text identified by the <p> tag represents the text of the same paragraph. In browsers, in addition to line breaks, different paragraphs of text are sometimes separated by a blank line to distinguish different paragraphs of text. The syntax is as follows: <p>Text</p> But in general applications, a <p> tag is often added only after the text to be divided into paragraphs. For example: The following is the quoted content: <html> <head> </head> <title><p>Use of tags</title> </head> <body> Qingping Diao The clouds resemble clothes, the flowers resemble faces, The spring breeze blows through the threshold, and the dew is thick. If we had not seen it on the top of the Jade Mountain, We will meet under the moon on Yaotai, </body> </html> So what is the difference between <br> and <p>? In layman's terms, when they branch, they divide into rows <p>The line spacing is relatively large! We can take a look at: The following is the quoted content: <html> <head> </head> <title><p>Use of tags</title> </head> <body> Qingping Diao<br> The clouds are like clothes, the flowers are like faces, The spring breeze blows through the threshold, and the dew is thick. If we had not seen it on the top of the Jade Mountain, We will meet under the moon on Yaotai, </body> </html> This way you can see the effect, can you see it? |
<<: The front end creates and modifies CAD graphics details through JavaScript
>>: How to install docker using YUM
Do you know what fonts are used in the logo desig...
Prerequisites A cloud server (centOS of Alibaba C...
First we need to know the self-calling of the fun...
The recommended code for playing background music ...
Solve the problem that the vue project can be pac...
Table of contents Scene Setting Game Resources Tu...
This should be something that many people have do...
The default MySQL version under the Alibaba Cloud...
Due to the default bridge network, the IP address...
In fact, it is not difficult to build an Apache c...
1. Modify MySQL login settings: # vim /etc/my.cnf...
Dig Introduction: Dig is a tool that queries DNS ...
1. Key points for early planning of VMware vSpher...
Table of contents Single content projection Multi...
The first method: Use Junge's one-click scrip...