HTML summary of the paragraph elements want to leave some space, but the direct play space symbol is definitely not working, because the browser will only display a space, no matter how many spaces you point is the same, but today's space character can help you these busy, and finally there are three characters in the ranking situation. Let's see this article together
First, let's take a look at how the HTML paragraph elements set spaces:
We all know that in the HTML paragraph, want to put a word between a little more distance, point a space, but in most mainstream browser all the space will only show a small space distance out, so in writing code will be the space symbol to use out, although now with less space symbol, But in some of the details of processing, want to leave some space when still use this whitespace processing is the most convenient.
Now let's take a look at the setting of whitespace in a paragraph element:
<!doctype html>
The above code left a large line behind the first sentence, and we thought that it would be greater than the distance between the spaces I used in the back.
Let's take a look at the display in the browser:
We can see very clearly, the first is to use so many spaces heap out of space, in the browser will only show a little space, followed by the effect of the space-character display is not more than their own space to play a lot better, the room suddenly much larger.
Of course, we usually do not want to empty a lot of space, even if you want to empty, it will not use spaces. Today we are talking about the use of space, not to mention the other, this space for some lazy people is still very useful. (Want to see more on the Topic.alibabacloud.comHTML Development Manual section of the study)
Let's take a look at this. There are also two space characters that are the same, let's take a look at:
  : "En space" is named according to the unit of measure of typography, width is the width of two ordinary spaces
  : "em space" is probably the width of four ordinary spaces
is a space symbol that does not affect line breaks. They are used a little less than a few, because they sometimes have empty space is relatively large.
Let's take a closer look at the difference between them:
<body><p> this is topic.alibabacloud.com;   . Here is topic.alibabacloud.com; this is topic.alibabacloud.com; . This is topic.alibabacloud.com, this is the PHP Chinese network;    Here is topic.alibabacloud.com; here is topic.alibabacloud.com; here is topic.alibabacloud.com; this is topic.alibabacloud.com;</p. ></body>
With three space symbols in it, let's look at the effect:
Three kinds of space tags, we look at the above display chart to rank them, of course, there are a lot of people on the Internet to this ranking, but we say their own, let oneself more clearly know on the line.
Now let's take a look at the picture above:
First place, the largest of course is the &EMSP, and it is obviously put, are three characters,   Max.
Second place, the second largest of the empty is &ENSP, and this is the second largest of the empty, nearly as big as the last one.
The last one, of course, is what we are talking about in this chapter spaces, although the space is small, but in some places it is very practical.
Well, today's article about the space is here, want to learn more about the Topic.alibabacloud.comhtml Reference Manual section to learn it. If you have questions, you can ask below.