HTML character entity



Reserved characters in HTML must be replaced with character entities.

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


HTML Entities

In HTML, certain characters are reserved.

You cannot use the less than sign (<) and the 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. Character entities are similar to this:

&entity_name;

or

&#entity_number;

such as To display the less than sign, we must write like this: < or < or <

lamp.gif## Tips: The advantage of using entity names instead of numbers is that the names are easier to remember. The downside is that browsers may not support all entity names (but support for entity numbers is good).


Non-breaking Space (Non-breaking Space)

The common character entity in HTML is the non-breaking space ( ).

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


Combined phonetic symbols

The phonetic symbols are a "glyph" added to letters.

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

Diacritical marks can appear above and below letters, within letters, or between two letters.

Diacritical marks can be used in combination with alphabetic and numeric characters.

The following are some examples:

Phonetic symbolsCharactersConstructOutput results ̀a## ́aáá̂aââ ̀aãã ̀OÒÒOO##   OÕÕ##HTML Character Entity
##àà
## ́
ÓÓ ̂
ÔÔ


Entity names are case-sensitive!
lamp.jpg
##<Less than sign< ;<##>&"'¢£##¥日本¥¥¥€€€€§ Section§§©Copyright©©Registered Trademarktrademark# #×Multiply sign××÷To view the complete HTML entity of this site: please click .
Display resultsDescriptionEntity nameEntity number
Space
Greater than sign>>
&&
quotation mark""
Apostrophe ' (IE does not support) '
¢¢
pound££
##®
® ®
##÷Division sign
÷HTML Entity Reference Manual