CodesCompiler
🔍
HTMLCSSJavaScriptPythonSQLPHPSEOPostsBooksKids About Contact 🚀 Get Started Free

HTML - Character Entities

HTML - Character Entities

HTML Entities

HTML entities are used to display special characters on the webpage that are reserved in HTML or have special meaning. HTML entities are also useful to display characters that are not available on the standard keyword.

An HTML entity starts with the ampersand sign ( & ) and ends with a semicolon ( ; ).

Example

For example, the less than and greater than have special meaning in HTML, and they must be replaced with HTML entities to display them on the webpage.

  • To display less than ( < ), use the <

  • To display greater than ( > ), use the >

HTML Character Entities

HTML character entities represent special characters in HTML and begin with an ampersand ( & ) and end with a semicolon ( ; ). These character entities allow you to display the characters on the webpages that cannot be displayed in the normal way as they have special meanings in HTML such as less than ( < ), greater than ( > ), Ampersand sing ( & ), and more.

The following table lists five special characters with their entities that every browser supports:

SymbolDescriptionEntity NameNumber Code
”Quotation mark""
‘Apostrophe''
&Ampersand&&
<Less than<<
>Greater than>>

HTML Non-breaking Space Entity

A non-breaking space does not break into a new line. HTML non-breaking space can be represented using   entity. It is useful when you want to display multiple spaces on the webpage because HTML trims the multiple spaces into a single space if you type it normally.

Note:

  • Two words that are separated by &nbsp will stick together even at the end of a line.

  • If you write 5 spaces in your text using the space bar, the browser will only add 1 space. To add real spaces to your text, you can use the &nbsp character entity.

Example of HTML Entities

The following example demonstrates how you can display special characters using HTML character entities:

Preview

There is also a long list of special characters in HTML 4.0. In order for these to appear in your document, you can use either the numerical codes or the entity names. For example, to insert a copyright symbol, you can use either of the following:

HTML CODE
&copy; 2007
or
&#169; 2007

ISO 8859-1 Symbol Entities

Following are the ISO 8859-1 symbol entities that are listed below:

ResultDescriptionEntity NameNumber Code
non-breaking space  
¡inverted exclamation mark¡¡
¤currency¤¤
¢cent¢¢
£pound££
¥yen¥¥
¦broken vertical bar¦¦
§section§§
¨spacing diaeresis¨¨
©copyright©©
ªfeminine ordinal indicatorªª
«angle quotation mark (left)««
¬negation¬¬
­soft hyphen­­
®registered trademark®®
™trademark™™
¯spacing macron¯¯
°degree°°
±plus-or-minus±±
²superscript 2²²
³superscript 3³³
´spacing acute´´
µmicroµµ
paragraph
·middle dot··
¸spacing cedilla¸¸
¹superscript 1¹¹
ºmasculine ordinal indicatorºº
»angle quotation mark (right)»»
¼fraction 1/4¼¼
½fraction 1/2½½
¾fraction 3/4¾¾
¿inverted question mark¿¿
×multiplication××
÷division÷÷

ISO 8859-1 Character Entities

Following are the ISO 8859-1 character entities that are listed below:

ResultDescriptionEntity NameNumber Code
Àcapital a, grave accentÀÀ
Ácapital a, acute accentÁÁ
Âcapital a, circumflex accentÂÂ
Ãcapital a, tildeÃÃ
Äcapital a, umlaut markÄÄ
Åcapital a, ringÅÅ
Æcapital aeÆÆ
Çcapital c, cedillaÇÇ
Ècapital e, grave accentÈÈ
Écapital e, acute accentÉÉ
Êcapital e, circumflex accentÊÊ
Ëcapital e, umlaut markËË
Ìcapital i, grave accentÌÌ
Ícapital i, acute accentÍÍ
Îcapital i, circumflex accentÎÎ
Ïcapital i, umlaut markÏÏ
Ðcapital eth, IcelandicÐÐ
Ñcapital n, tildeÑÑ
Òcapital o, grave accentÒÒ
Ócapital o, acute accentÓÓ
Ôcapital o, circumflex accentÔÔ
Õcapital o, tildeÕÕ
Öcapital o, umlaut markÖÖ
Øcapital o, slashØØ
Ùcapital u, grave accentÙÙ
Úcapital u, acute accentÚÚ
Ûcapital u, circumflex accentÛÛ
Ücapital u, umlaut markÜÜ
Ýcapital y, acute accentÝÝ
Þcapital THORN, IcelandicÞÞ
ßsmall sharp s, Germanßß
àsmall a, grave accentàà
ásmall a, acute accentáá
âsmall a, circumflex accentââ
ãsmall a, tildeãã
äsmall a, umlaut markää
åsmall a, ringåå
æsmall aeææ
çsmall c, cedillaçç
èsmall e, grave accentèè
ésmall e, acute accentéé
êsmall e, circumflex accentêê
ësmall e, umlaut markëë
ìsmall i, grave accentìì
ísmall i, acute accentíí
îsmall i, circumflex accentîî
ïsmall i, umlaut markïï
ðsmall eth, Icelandicðð
ñsmall n, tildeññ
òsmall o, grave accentòò
ósmall o, acute accentóó
ôsmall o, circumflex accentôô
õsmall o, tildeõõ
ösmall o, umlaut marköö
øsmall o, slashøø
ùsmall u, grave accentùù
úsmall u, acute accentúú
ûsmall u, circumflex accentûû
üsmall u, umlaut marküü
ýsmall y, acute accentýý
þsmall thorn, Icelandicþþ
ÿsmall y, umlaut markÿÿ

Other Entities Supported by Browsers

Following are the other entities that are supported by browsers:

ResultDescriptionEntity NameNumber Code
Œcapital ligature OEŒŒ
œsmall ligature oeœœ
Šcapital S with caronŠŠ
šsmall S with caronšš
Ÿcapital Y with diaeresŸŸ
ˆmodifier letter circumflex accentˆˆ
˜small tilde˜˜
en space  
em space  
thin space  
‌zero width non-joiner‌‌
‍zero width joiner‍‍
‎left-to-right mark‎‎
‏right-to-left mark‏‏
–en dash––
—em dash——
‘left single quotation mark‘‘
’right single quotation mark’’
‚single low-9 quotation mark‚‚
“left double quotation mark““
”right double quotation mark””
„double low-9 quotation mark„„
†dagger††
‡double dagger‡‡
…horizontal ellipsis……
‰per mille‰‰
‹single left-pointing angle quotation‹‹
›single right-pointing angle quotation››
€euro€€