Whitespace and newline display of HTML

Source: Internet
Author: User

all contiguous spaces or blank lines (line breaks) in the HTML code are displayed as a single space, either between the content or the label. Second, when we want them to display in the same line continuously, let all the code between no space, and do not break line. Third, when we want to display continuous spaces, you can use the following methods: 1, use <pre><pre>     This is a pre-formatted text that retains     spaces    and Blank lines.  </pre>2, with space entity &nbsp; Instead of spaces, replace blank lines with newline labels <br/> . 3, with full-width space, full-width space is interpreted as Chinese characters, so will not be interpreted as an HTML delimiter, can be displayed according to the actual number of spaces. 4, with the word-spacing attribute. 5. Using the White-space property, this property declares how to handle whitespace inside an element. 

Whitespace and line breaks for HTML

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.