HTML Entities

Reserved characters in HTML must be replaced with character entities.

Some characters not found on the keyboard can also be replaced using character entities.

HTML special characters are characters that must be represented by entities, because the characters themselves have a special meaning to HTML, even when they appear in text. These are only the characters “, ‘, <, >, and &.


HTML entities

In HTML, certain characters are reserved.

Less-than (<) and greater-than (>) signs cannot be used in HTML because browsers mistake them for tags.

If we want to display reserved characters correctly, we must use character entities in the HTML source code. Character entities look like this:

&entity_name;
or
&#entity_number;

To show the less than sign, we must write: < or < or <

RemarkTip: The advantage of using entity names instead of numbers is that the names are easier to remember. The downside, though, is that browsers may not support all entity names (it does support entity numbers well).


Non-breaking Space

A common character entity in HTML is the nonbreaking space ( ).

Browsers always truncate spaces in HTML pages. If you write 10 spaces in the text, the browser removes 9 of them before displaying the page. To increase the number of spaces in a page, you need to use the character entity.


Combine phonetic symbols

A diacritic is a “glyph” added to a letter.

Some diacritics, such as acute ( ̀) and grave ( ́) .

Diacritics can appear above and below a letter, within a letter, or between two letters.

Diacritics can be used in combination with alphanumeric characters.

Here are some examples:

phonetic symbolCharacterConstructResult
  ̀aa&#768;à
  ́aa&#769;á
̂aa&#770;â
  ̃aa&#771;ã
  ̀OO&#768;Ò
  ́OO&#769;Ó
̂OO&#770;Ô
  ̃OO&#771;Õ

HTML character entities

lampEntity names are case sensitive!
Show resultsdescribeentity nameentity number
 space  
<Less than sign<<
>greater than sign>>
&ampersand&&
quotation marks
apostrophe ‘ (not supported by IE)
Minute¢¢
£pound££
¥RMB/JPY¥¥
EUR
§subsection§§
©copyright©©
®Trademark®®
trademark
×Multiplication sign××
÷division sign÷÷

While html is not case sensitive, entity characters are case sensitive.

To view the complete HTML entities on this site: please click on the HTML Entities Reference Manual .