23 - Symbol Entities

In the previous chapter we learnt how to display various reserved characters in HTML, now we will see how to display various symbols.

Symbols that are not present on Keyboard like arrows, mathematical operators, shapes, Greek letters, currency symbols etc can be easily displayed using the predefined entity numbers or names defined in HTML specification.

An example program

<html>
  <body>
   <p>Euro is displayed as &euro;</p>
   <p>Pound is displayed as &pound;</p>
  </body>
</html>

The output f the above program would be

The following is the list of some important symbol entities used in HTML

Entity

Description

Entity Name

Entity number

 

non-breaking space

&nbsp;

&#160;

¡

inverted exclamation mark

&iexcl;

&#161;

¤

currency

&curren;

&#164;

¢

cent

&cent;

&#162;

£

pound

&pound;

&#163;

¥

yen

&yen;

&#165;

¦

broken vertical bar

&brvbar;

&#166;

§

section

&sect;

&#167;

¨

spacing diaeresis

&uml;

&#168;

©

copyright

&copy;

&#169;

ª

feminine ordinal indicator

&ordf;

&#170;

«

angle quotation mark (left)

&laquo;

&#171;

¬

negation

&not;

&#172;

 

soft hyphen

&shy;

&#173;

®

registered trademark

&reg;

&#174;

trademark

&trade;

&#8482;

¯

spacing macron

&macr;

&#175;

°

degree

&deg;

&#176;

±

plus-or-minus 

&plusmn;

&#177;

²

superscript 2

&sup2;

&#178;

³

superscript 3

&sup3;

&#179;

´

spacing acute

&acute;

&#180;

µ

micro

&micro;

&#181;

paragraph

&para;

&#182;

·

middle dot

&middot;

&#183;

¸

spacing cedilla

&cedil;

&#184;

¹

superscript 1

&sup1;

&#185;

º

masculine ordinal indicator

&ordm;

&#186;

»

angle quotation mark (right)

&raquo;

&#187;

¼

fraction 1/4

&frac14;

&#188;

½

fraction 1/2

&frac12;

&#189;

¾

fraction 3/4

&frac34;

&#190;

¿

inverted question mark

&iquest;

&#191;

×

multiplication

&times;

&#215;

÷

division

&divide;

&#247;

Trademark

&trade;

&#8482;

Leftwards arrow

&larr;

&#8592;

upwards arrow

&uarr;

&#8593;

Rightwards arrow

&rarr;

&#8594;

Downwards arrow

&darr;

&#8595;

Black Spade suit

&spades;

&#9824;

Black Club suit

&clubs;

&#9827;

Black Heart suit

&hearts;

&#9829;

Black Diamond suit

&diams;

&#9830;

Α

Alpha

&Alpha;

&#913;

Β

Beta

&Beta;

&#914;

Γ

Gamma

&Gamma;

&#915;

Δ

Delta

&Delta;

&#916;

Ε

Epsilon

&Epsilon;

&#917;

Ζ

Zeta

&Zeta;

&#918;

For all

&forall;

&#8704;

Partial differential

&part;

&#8706;

There exists

&exist;

&#8707;

Empty set

&empty;

&#8709;

Nabla

&nabla;

&#8711;

Element of

&isin;

&#8712;

Not an element of

&notin;

&#8713;

Contains as member

&ni;

&#8715;

N-ary product

&prod;

&#8719;

N-ary summation or sigma

&sum;

&#8721;

Like us on Facebook