How do the paragraph text in HTML Wrap? An article that tells you the use of a newline label BR

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.