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 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