HTML: Write protected space
An HTML code consists of different components and has a specific structure. You can also write protected spaces in HMTL code. These are very useful if you don't want your expressions to be separated by a newline to the right and left of the space. This can be useful when using numbers.
How to write a protected space in HTML
Protected spaces can be very useful if you don't want certain expressions to be separated by a line break. This is useful within texts for numbers, units or proper names, for example. If you use an ordinary space, it is not certain that these expressions will stay together or will not be separated by a line break. If you set the space, you write two upward quotation marks with a space between them. A protected space, on the other hand, is represented differently in HTML.- For a protected space, you must write the expression .
- means "non-breaking-space" at length, that is, space that is not broken.
- The expression for the protected space is placed after the character to be protected.
- However, if you want to protect a sentence or a longer text, you need the tag "<nobr>". Therefore, write <nobr>Do not break this line</nobr>. This line can now not be broken apart.
- Depending on which HTML editor you use, you may run into problems with the <nobr> tag. If this is the case, you can usually just use .