HTML Character Entities

The reserved characters in HTML must be replaced with character entities.

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

HTML Entities

In HTML, certain characters are reserved.

You cannot use the less than sign (<) and greater than sign (>) in HTML, because the browser will mistake them for tags.

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




To display the less than sign, we must write: &lt; or &#60; or &#060;

RemarkTip: The advantage of using physical names instead of numbers is that the names are easy to remember. But the disadvantage is that the browser may not support all entity names (the support for entity numbers is good).

Non-Breaking Space

A common character entity in HTML is the non-breaking space (&nbsp;).

The browser always shortens the spaces in the HTML page. If you write 10 spaces in the text, the browser will delete 9 of them before displaying the page. To increase the number of spaces on the page, you need to use the &nbsp; character entity.

Combine Phonetic Symbols

The pronunciation symbol is a "glyph" added to the letter.

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

The diacritics can appear above and below the letter, or inside the letter, or between two letters.

The diacritics can be used in combination with letters and numbers.

Here are some examples:

Phonetic SymbolsCharacterConstructOutput Result

HTML Character Entities


 Entity names are case sensitive!

ResultsDescribeEntity nameEntity number

<Less than sign&lt;&#60;
>Greater than sign&gt;&#62;
&And sign&amp;&#38;
"quotation marks&quot;&#34;
'apostrophe &apos; (IE does not support)&#39;
¥RMB/Japanese Yen&yen;&#165;
×Multiplication sign&times;&#215;
÷Division sign&divide;&#247;

Although html is not case sensitive, physical characters are case sensitive.

View the complete HTML entity of this site: please click HTML entity reference manual .