This article mainly explains the use of the BR tag for HTML paragraph text wrapping, and in one paragraph, the correct line wrapping can make the page more beautiful. Now let's take a look at this article about HTML paragraph text wrapping.
First, let's look at how the paragraph text wraps:
The paragraphs in the Web page are usually represented by <p> tags, then the text in a P tag will be displayed in a section of the browser, unless the browser frame is not enough, it will be displayed in a row, only the frame is not enough to automatically wrap, but if we want to manually to the inside of the line can be? The truth is, of course, the line in your code is not as moving as the browser looks like, up to a little more space. So what we're going to use now is what we're talking about in this article about the use of BR tags.
The <br> tag is a single label, and BR is used to display the text in a newline, so that the browser can recognize it.
So, now let's look at the snippet code:
<!doctype html>
Here is a paragraph that looks at the effect:
is because the browser window is small. So the number of lines displayed is more, this is not very messy. But what we want is for the text to be displayed in the next line after which Word does not appear. (Want to see more: HTML online video tutorial)
Now we add <br> tag to see the effect:
<body><p> here is topic.alibabacloud.com, with the most complete online teaching course, which includes all the programming disciplines so you can learn more. </br> here is topic.alibabacloud.com, with the most complete online teaching course, which includes all the programming disciplines so you can learn more. </br> here is topic.alibabacloud.com, with the most complete online teaching course, which includes all the programming disciplines so you can learn more. </br> here is topic.alibabacloud.com, with the most complete online teaching course, which includes all the programming disciplines so you can learn more. </p></body>
Looking at the code above, I put three br tags in it to see the effect:
is not the feeling instantly clear a lot of AH. This is the use of the BR tag. We usually put the BR tag in the place where we want to change the line, so as to play a role, or if the text is not put or put it is not beautiful, we can use the BR tag to adjust the format of the text.
OK, this article about HTML paragraph text wrapping is here to end, if there is a problem can be asked below.