HTML Entities

Some reserved characters in HTML have special meaning when used in HTML page, these characters are not present on our keyboard and can be replaced by entities. For example, we cannot use less then (<) and greater then (>) with your HTML text because the browser might mix them with tags.
To display a less then (<) we should write &lt;.

Example:

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

<html>
<head>
<title>HTML Entities</title>
</head>
<body>
&lt;div id = &quot;my_div&quot;&gt;
</body>
</html>


Output:

Some HTML Character Entities

ResultDescriptionEntity NameNumber Code
<less than&lt;&#60;
>greater than&gt;&#62;
non-breaking space&nbsp;&#160;
&ampersand&amp;&#38;
quotation mark&quot;&#34;
apostrophe&apos;&#39;
¢cent&cent;&#162;
£pound&pound;&#163;
¥yen&yen;&#165;
©copyright&copy;&#169;
euro&euro;&#8364;
®registered trademark&reg;&#174;

Some HTML Entities for Arrows

MnemonicCodeResultDescription
&darr;&#8595;= ↓downwards arrow
&larr;&#8592;= ←leftwards arrow
&rarr;&#8594;= →rightwards arrow
&harr;&#8596;= ↔left right arrow
&crarr;&#8629;= ↵downwards arrow with corner leftwards
&lArr;&#8656;= ⇐leftwards double arrow
&uArr;&#8657;= ⇑upwards double arrow
&rArr;&#8658;= ⇒rightwards double arrow
&dArr;&#8659;= ⇓downwards double arrow
&hArr;&#8660;= ⇔left right double arrow

Some Mathematical Operators

MnemonicCodeResultDescription
&part;&#8706;= ∂partial differential
&exist;&#8707;= ∃there exists
&forall;&#8704;= ∀for all
&empty;&#8709;= ∅empty set = null set = diameter
&nabla;&#8711;= ∇nabla = backward difference
&isin;&#8712;= ∈element of
&ni;&#8715;= ∋contains as member
&notin;&#8713;= ∉not an element of
&prod;&#8719;= ∏n-ary product = product sign
&sum;&#8721;= ∑n-ary sumation
&minus;&#8722;= −minus sign
&radic;&#8730;= √square root = radical sign
&prop;&#8733;= ∝proportional to
&lowast;&#8727;= ∗asterisk operator
&infin;&#8734;= ∞infinity
&ang;&#8736;= ∠angle
&there4;&#8756;= ∴therefore
&and;&#8743;= ∧logical and = wedge
&or;&#8744;= ∨logical or = vee
&cap;&#8745;= ∩intersection = cap
&cup;&#8746;= ∪union = cup
&int;&#8747;= ∫integral
&sim;&#8764;= ∼tilde operator = varies with = similar to

Other Entities Supported by HTML Browsers

ResultDescriptionEntity NameNumber Code
Œcapital ligature OE&OElig;&#338;
en dash&ndash;&#8211;
em dash&mdash;&#8212;
left single quotation mark&lsquo;&#8216;
right single quotation mark&rsquo;&#8217;
single low-9 quotation mark&sbquo;&#8218;
left double quotation mark&ldquo;&#8220;
right double quotation mark&rdquo;&#8221;
double low-9 quotation mark&bdquo;&#8222;
dagger&dagger;&#8224;
double dagger&Dagger;&#8225;
horizontal ellipsis&hellip;&#8230;
per mille &permil;&#8240;
single left-pointing angle quotation&lsaquo;&#8249;
single right-pointing angle quotation&rsaquo;&#8250;
euro&euro;&#8364;
œsmall ligature oe&oelig;&#339;
Šcapital S with caron&Scaron;&#352;
šsmall S with caron&scaron;&#353;
Ÿcapital Y with diaeres&Yuml;&#376;
ˆmodifier letter circumflex accent&circ;&#710;
˜small tilde&tilde;&#732;

Leave a Reply