HTML – Entities

Some characters are reserved in HTML and they have special meaning when used in HTML document. For example, you cannot use the greater than and less than signs or angle brackets within your HTML text because the browser will treat them differently and will try to draw a meaning related to HTML tag.

HTML processors must support following five special characters listed in the table that follows.

If you want to write <div id = “character”> as a code then you will have to write as follows −

This will produce the following result −

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 −

Result
Description
Entity Name
Number Code

Œ
capital ligature OE
&OElig;
Œ

œ
small ligature oe
&oelig;
œ

Š
capital S with caron
&Scaron;
Š

š
small S with caron
&scaron;
š

Ÿ
capital Y with diaeres
&Yuml;
Ÿ

ˆ
modifier letter circumflex accent
&circ;
ˆ

˜
small tilde
&tilde;
˜


en space
&ensp;


em space
&emsp;


thin space
&thinsp;


zero width non-joiner
&zwnj;


zero width joiner
&zwj;


left-to-right mark
&lrm;


right-to-left mark
&rlm;


en dash
&ndash;


em dash
&mdash;


left single quotation mark
&lsquo;


right single quotation mark
&rsquo;


single low-9 quotation mark
&sbquo;


left double quotation mark
&ldquo;


right double quotation mark
&rdquo;


double low-9 quotation mark
&bdquo;


dagger
&dagger;


double dagger
&Dagger;


horizontal ellipsis
&hellip;


per mille 
&permil;


single left-pointing angle quotation
&lsaquo;


single right-pointing angle quotation
&rsaquo;


euro
&euro;