
How to Add Non-breaking Spaces in HTML with Then you can safely display them in the browser.
If you want to use them as "greater than" and "less than", you need to use their respective character entities ( < and >).If you want to use them in your code, HTML might mistake them for opening and closing tags. First, What Are Character Entities?Ĭharacter entities are reserved for displaying various characters in the browser.įor instance, the less than symbol ( ) are reserved for tags in HTML. So, in this article, I will show you how to create any number of blank spaces you want in your code, and how to add a non-breaking space with the character entity. If you want 10 blank spaces in your HTML code and you try to add them with the spacebar, you'll only see one space in the browser.Īlso, one or more of the words that are supposed to be together might break into a new line.


In HTML, you can't create an extra blank space after the space ( ) character with the spacebar.
