What is the entity name used for non-breaking space in HTML ?
The character entity is used to denote a non-breaking space which is a fixed space. This may be perceived as twice the space of a normal space. It is used to create a space in a line that cannot be broken by word wrap.
If we want to use Two spaces gap, we have to use   and to use four space –   is used.
Syntax:
Example 1: In this example, we are using single to get one space.
HTML
<!DOCTYPE html> < html > < body > < h1 style = "color: green;" > w3wiki </ h1 > < p >This is a regular space.</ p > </ body > </ html > |
Output:
Example 2: In this example, we are using a single 4 to get four spaces.
HTML
<!DOCTYPE html> < html > < body > < h1 style = "color: green" > w3wiki </ h1 > < p >This is a space .</ p > </ body > </ html > |
Output:
Contact Us