HTML white space



 

In an HTML file, if you enter a lot of spaces (space), you will find that there is only one space on the page screen? Basically, this problem comes from the fact that HTML files are not ordinary text files. HTML uses tags for typesetting and content layout, so multiple spaces will only be parsed as a blank by the browser.

E.g:

extra   space

We typed three spaces, but you will see the following results on the actual page:

extra space

If you need to type multiple spaces, you can use HTML entity   .

We  rewrite the above example:

extra   space

The actual effect is as follows:

extra   space

There are also some HTML entities of space type like:

  •   Half space
  •   Full space
  •   Narrow space

Post a Comment

0 Comments