Few characters are reserved in HTML and they have special meaning when used in HTML document.
For example if you use the less than (
<) or greater than (
>) signs in your text, the browser will mix them with tags.
Character entities are used to display reserved characters in HTML.
A character entity looks like this:
&entity_name; OR entity_number;
To display a less than sign (
<) we must write:
To display a grater than sign (
>) we must write:
To display character entities in your document you can either use entity name or entity number.
A non-breaking space is a space that will not break into a new line.
Common use of the non-breaking space is to prevent browsers from truncating spaces in HTML pages.
character entity allows you to create multiple spaces that are visible on a web page.
<p>I love Mango</p>
With the above examples using
would allow you to create multiple spaces in a row, something that cannot be done by only pressing the spacebar.
An HTML entity begins with the ampersand (
&) character and ends with the semicolon (
|Character||Entity name||Entity number|
|<space>|| || |