How can HTML be wrapped? What is the line break code? Summary of nine ways to wrap HTML text

Source: Internet
Author: User
In the HTML to write the page, in order to make the content of the Web page looks neat and smooth, we need to wrap the text content, then, HTML How to change the line? This article will introduce you to the HTML text wrapping method.

There are many ways of wrapping in HTML, the simplest of which is the use of <br> tags, but sometimes we need to use a variety of different methods to implement text wrapping for the design of the web. We'll take a look at some of the ways in which we can wrap. (Tag reference: HTML manual)

1, the HTML line-wrapping code is <BR>, if you want to wrap in which line, in the line of code after the input <br> code to achieve the line-wrapping operation. This method is the simplest, as has been said, so let's take a look at its example


The effect is as follows:

2, <P> is a blank line, a <P> row, two <P> two lines.

Example:


The effect is as follows:

3, if the location of the line is a div layer, you can also write <div style= "padding-left:5px" ></div>.

4, can be done through the third-party software HTML more convenient operation, such as dream wearer, only need to enter the line to achieve.

5, if have <PRE> ... </pre>, from <PRE> to </PRE> the contents of the original how to divide the line, how to divide, do not add <br>.

Example:


The effect is as follows:

7, using different sizes of transparent images to split, insert a number of 1 times 1 size of transparent. gif pictures to control the spacing.

8, use CSS table to adjust.

9, the table, the use of "cellspacing", "cellpadding", "rowspan", "colspan" and other properties to achieve line wrapping.

The above nine methods, in the actual use can be used, to see which one suitable for which, more HTML wrapping content can focus on the PHP Chinese web.

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.