How to put a space html
If you are developing html-files, thenprobably noticed this feature when the browser ignores spaces. In the source code, there can be an unlimited number of them, but only one is visible as a result. Most often, this restriction only positively affects the output of information. After all, sometimes you can put a few spaces at random, as a result, the document turns out to be unordered. And with the help of restriction the distance between words will always be fixed. But sometimes there is a need to make a double or triple space, html will allow you to make unlimited distance between words at your discretion. You can implement this need in several ways, which we'll talk about in this article.
The first way
When there is a need to make a longerthe distance between certain words, you can use a special space code html. It's enough to add the "& nbsp" entry, which will increase the distance between the characters. Such code can be used as a regular blank, except that it will always be taken into account when displaying information by the browser. This special html space is sometimes used to emulate a red line or select a separate text fragment. It is necessary to tell a little about the code itself. The first character is the ampersand character. It denotes the action of a special code. In html there are many other combinations that give different effects. For example, "& gt" and "& gl" replace the signs "<" and ">". Their use is necessary, since they denote the beginning and end of the tag. In this case, "nbsp" means the abbreviated form of the command "non-breaking space", which in translation means "non-breaking space". There is a numerical value for this command.
The second way
The second method is used for largergoals. A space in html can be set using the <pre> tag. It allows you to output text without additional formatting. If the information is placed in this tag, it will be presented in the original form as in the html-code of the page. It takes into account not only spaces, but also line breaks. But it's worth noting that, as with the "& nbsp" code, the text enclosed in the <pre> tag will appear on one line if there is no natural translation. There is one more remark. All that is between the opening and, respectively, the closing <pre> tag, will have a specific font
The third way
This method can not be called new, because hejust offers an alternative to the second. Using cascading style sheets, you can achieve the same effect as the <pre> tag. But the font will remain unchanged. The rule "white-space" with the value "pre" fully emulates the html space with the previously described tag. This command can be applied to any area of text.
Conclusion
The above methods will help you putrepeated space. HTML thus makes it very flexible and at its discretion to customize its pages. But, as practice shows, it is rare to use a multiple space.