Reserved characters in HTML should be replaced by character entities.
inclusion of Characters which are not present on your keyboard can also be done using entities.
In HTML, Some characters are kept reserved .
when you are using the less than (<) or greater than (>) signs in your text, the browser can possibily mix them with tags.
Character entities are utilised for displaying reserved characters in HTML.
A character entity will appear like this:
for displaying a less than sign (<) we must write: < or <
entity name usage advantage:remembering an entity name is easy.
entity name disadvantage: few browsers may or may not support all entity names, but the support for numbers is good.
A common character entity which is predominantly used in HTML is the non-breaking space:
A non-breaking space can be said as a space which will not be breaking into a new line.
Two words that are separated using a non-breaking space will stick together (i.e not break into a new line). This is useful and handy while breaking the words might become disruptive.
Another common usage of the non-breaking space is prevention of browsers for truncating spaces in HTML pages.
If you are using 10 spaces in your text, 9 of them will be removed by the browser.For adding real spaces to your text, usage of character entityis helpful.
The non-breaking hyphen (‑) allows you to use a hyphen character (‑) which won't break.
Some Other Useful HTML Character Entities
|Result||Description||Entity Name||Entity Number|
|non-breaking space|| || |
case sensitivity is applicable to entity names.
Combination of Diacritical Marks
A diacritical mark can be called as a "glyph" which is added to a letter.
Some of the diacritical marks, such as grave ( ̀) and acute ( ́) are called accents.
Diacritical marks can be appearing at both above and below a letter or inside a letter or in-between two letters.
combinations of diacritical marks can also be utilised in combination, to produce a character that is not present in the character set (encoding) used in the page.
you can see some examples here:
We can see more of HTML symbols in the following chapter of this tutorial.