HTML Character Codes

If in a situation, a programmer wants to display some characters, which have special meaning in the HTML, How would he do it ?

Characters with special meaning are called reserved characters. For example, left (<) and right (>) angle brackets are used in HTML to identify the opening and closing tags of elements. So, what if we want to display these brackets in the page, we cannot use them directly by entering the symbols from the keyboard because the browser will take it as tags and not as normal text and will not display them in the webpage. To overcome this situation codes are used, to display some these types of characters. The angle brackets displayed in this paragraph also used character codes.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Character Code </title>
</head>
<body>
<p>I will display &#36;</p>
<p>I will display &#169;</p>
<p>I will display &#9829;</p>
</body>
</html>

Output

HTML Character Code

I will display $

I will display ©

I will display ♥


List of Special Character Codes

Essential Entities

Character Code Name Numeric Code Description
& &amp; &#38; Ampersand
" &quot; &#34; Double quote mark
< &lt; &#60; Less than symbol
> &gt; &#62; Greater than symbol
' &apos; &#39; Apostrophe (XHTML only)

Currency Symbols

Character Code Name Numeric Code Description
$ &dollar; &#36; Dollar
¢ &cent; &#162; Cent
£ &pound; &#163; Pound
¤ &curren; &#164; General currency
¥ &yen; &#165; Yen
&euro; &#8364; Euro

Copyright, Trademark, and Registered Symbol

Character Code Name Numeric Code Description
© &copy; &#169; Copyright
® &reg; &#174; Registered
&trade; &#8482; Trademark

Arrows

Character Code Name Numeric Code Description
&larr; &#8592; Left arrow
&uarr; &#8593; Up arrow
&rarr; &#8594; Right arrow
&darr; &#8595; Down arrow
&harr; &#8596; Left-right arrow
&crarr; &#8629; Down arrow with corner leftward
&lArr; &#8656; Leftward double arrow
&uArr; &#8657; Upward double arrow
&rArr; &#8658; Rightward double arrow
&dArr; &#8659; Downward double arrow
&hArr; &#8660; Left-right double arrow

Math Symbol

Character Code Name Numeric Code Description
&forall; &#8704; for all
&part; &#8706; Partial differential
&exist; &#8707; There exists
&empty; &#8709; Empty set, null set, diameter
&nabla; &#8711; Nabla, backward difference
&isin; &#8712; Element of
&notin; &#8713; Not an element of
&ni; &#8715; Contains as a member
&prod; &#8719; N-ary product, product sign
&sum; &#8721; N-ary summation
&minus; &#8722; Minus sign
&lowast; &#8727; Asterisk operator
&radic; &#8730; Square root, radical sign
&prop; &#8733; Proportional to
&infin; &#8734; Infinity
&ang; &#8736; Angle
&and; &#8743; Logical and, wedge
&or; &#8744; Logical or, vee
&cap; &#8745; Intersection, cap
&cup; &#8746; Union, cup
&int; &#8747; Integral
&there4; &#8756; Therefore
&sim; &#8764; Tilde operator, varies with, similar to
&cong; &#8773; Approximately equal to
&asymp; &#8776; Almost equal to, asymptotic to
&ne; &#8800; Not equal to
&equiv; &#8801; Equivalent to
&le; &#8804; Less than or equal to
&ge; &#8805; Greater than or equal to
&sub; &#8834; Subset of
&sup; &#8835; Superset of
&nsub; &#8836; Not a subset of
&sube; &#8838; Subset of or equal to
&supe; &#8839; Superset of or equal to
&oplus; &#8853; Circled plus, direct sum
&otimes; &#8855; Circled times, vector product
&perp; &#8869; Up tack, orthogonal to, perpendicular
&sdot; &#8901; Dot operator

Greek Letters

Character Code Name Numeric Code Description
Α &Alpha; &#913; Greek capital alpha
Β &Beta; &#914; Greek capital beta
Γ &Gamma; &#915; Greek capital gamma
Δ &Delta; &#916; Greek capital delta
Ε &Epsilon; &#917; Greek capital epsilon
Ζ &Zeta; &#918; Greek capital zeta
Η &Eta; &#919; Greek capital eta
Θ &Theta; &#920; Greek capital theta
Ι &Iota; &#921; Greek capital iota
Κ &Kappa; &#922; Greek capital kappa
Λ &Lambda; &#923; Greek capital lambda
Μ &Mu; &#924; Greek capital mu
Ν &Nu; &#925; Greek capital nu
Ξ &Xi; &#926; Greek capital xi
Ο &Omicron; &#927; Greek capital omicron
Π &Pi; &#928; Greek capital pi
Ρ &Rho; &#929; Greek capital rho
Σ &Sigma; &#931; Greek capital sigma
Τ &Tau; &#932; Greek capital tau
Υ &Upsilon; &#933; Greek capital upsilon
Φ &Phi; &#934; Greek capital phi
Χ &Chi; &#935; Greek capital chi
Ψ &Psi; &#936; Greek capital psi
Ω &Omega; &#937; Greek capital omega
α &alpha; &#945; Greek small alpha
β &beta; &#946; Greek small beta
γ &gamma; &#947; Greek small gamma
δ &delta; &#948; Greek small delta
ε &epsilon; &#949; Greek small epsilon
ζ &zeta; &#950; Greek small zeta
η &eta; &#951; Greek small eta
θ &theta; &#952; Greek small theta
ι &iota; &#953; Greek small iota
κ &kappa; &#954; Greek small kappa
λ &lambda; &#955; Greek small lambda
μ &mu; &#956; Greek small mu
ν &nu; &#957; Greek small nu
ξ &xi; &#958; Greek small xi
ο &omicron; &#959; Greek small omicron
π &pi; &#960; Greek small pi
ρ &rho; &#961; Greek small rho
ς &sigmaf; &#962; Greek small letter final sigma
σ &sigma; &#963; Greek small sigma
τ &tau; &#964; Greek small tau
υ &upsilon; &#965; Greek small upsilon
φ &phi; &#966; Greek small phi
χ &chi; &#967; Greek small chi
ψ &psi; &#968; Greek small psi
ω &omega; &#969; Greek small omega
ϑ &thetasym; &#977; Greek small theta symbol
ϒ &upsih; &#978; Greek upsilon with hook
ϖ &piv; &#982; Greek pi symbol

Miscellaneous

Character Code Name Numeric Code Description
&lceil; &#8968; Left ceiling
&rceil; &#8969; Right ceiling
&lfloor; &#8970; Left floor
&rfloor; &#8971; Right floor
&lang; &#10216; Left-pointing angle bracket
&rang; &#10217; Right-pointing angle bracket
&loz; &#9674; Lozenge
&image; &#8465; Blackletter capital I, imaginary part
&weierp; &#8472; Script capital P, power set
&real; &#8476; Blackletter capital R, real part
&alefsym; &#8501; Alef symbol, or first transfinite cardinal
&spades; &#9824; Black spade suit
&clubs; &#9827; Black club suit
&hearts; &#9829; Black heart suit
&diams; &#9830; Black diamond suit

General Punctuation

Character Code Name Numeric Code Description
&ensp; &#8194; En space
&emsp; &#8195; Em space
&thinsp; &#8201; Thin space
  &nbsp; &#160; Nonbreaking space
&ndash; &#8211; En dash
&mdash; &#8212; Em dash
&lsquo; &#8216; Left/Opening single-quote
&rsquo; &#8217; Right/Closing single-quote and apostrophe
&sbquo; &#8218; Single low-9 quotation mark
&ldquo; &#8220; Left/Opening double-quote
&rdquo; &#8221; Right/Closing double-quote
&bdquo; &#8222; Double low-9 quotation mark
&lsaquo; &#8249; Left-pointing single angle quotation mark
&rsaquo; &#8250; Left-pointing single angle quotation mark
« &laquo; &#171; Left-pointing double angle quotation mark
» &raquo; &#187; Right-pointing double angle quotation mark
&dagger; &#8224; Dagger
&Dagger; &#8224; Double dagger
&bull; &#8226; Bullet
&hellep; &#8230; Ellipses
&permil; &#8240; Per mille symbol (per thousand)
&prime; &#8242; Prime, minutes, feet
&Prime; &#8243; Double prime, seconds, inches
&oline; &#8254; Overline
&frasl; &#8260; Fraction slash










Follow Us: