
Unlike traditional space character, two or more consecutive NBSPs do not get collapsed to a single one.

For example, the following code will work in an external stylesheet. 2 days ago NBSP stands for Non-Breaking Space. white-space: pre-wrap This will allow you to have multiple spaces side by side in a single line. For those that reached here looking for a solution, try the CSS. The unfortunate part about is it does not wrap properly because it is a non-breaking space. Then you can use an external or internal styling to give the class tab some properties. If you are using HTML and you would like more than one space to to appear, will not work. Note that tags are self closing, meaning they do not need a />.

Instead, to keep your code easy to maintain and reduce. The easiest way is by simply adding spaces or multiple character entities before and after the target text. There are a number of ways to insert spaces in HTML. Instead, to keep your code easy to maintain and reduce repetition, you can use the and elements, along with a bit of CSS: Using the elementĪn example of how to use to control the spacing between text can be seen below: Hello my name is James Why You Should Use Tab Space Instead of Multiple Non-Breaking Spaces (nbsp) in HTML.

