Tutorialspoint.dev

HTML | Entities

HTML provides some method to display reserved character. Reserved characters are those characters which are either reserved for HTML or those which are not present in the basic keyboard.
For Example: '<' is already reserved in HTML language. Sometimes this character need to display on the web page which create ambiguity in code. Along with these are the character which are normally not present in basic keyboard ( £, ¥, €, © ) etc.
HTML provide some Entity name and Entity number to use this symbols. Entity number is easy to learn. Some useful Symbol with their entity name and Entity numbers are as follows.

Notation Symbols Entity name Entity Number
  non-breaking space &nbsp; &#160;
< less than &lt; &#060;
® registered trademark &reg; &#174;
© copyright &copy; &#169;
euro &euro; &#8364;
¥ yen &yen; &#165;
£ pound &pound; &#163;
¢ cent &cent; &#162;
" double quotation mark &quot; &#034;
& ampersand &amp; &#038;
> greater than &gt; &#062;
PARTIAL DIFFERENTIAL &part; &#8706<
THERE EXISTS &exist; &#8707
EMPTY SETS &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 &sum; &#8721;
Α Alpha &Alpha; &#913;
Β Beta &Beta; &#914;
Γ Gamma &Gamma; &#915;
Δ delta &Delta; &#916;
Ε Epsilon &Epsilon; &#917;
Ζ Zeta &Zeta; &#918;
BLACK HEART SUIT &hearts; &#9829;
BLACK CLUB SUIT &clubs; &#9827;
BLACK SPADE SUIT &spades; &#9824;
DOWNWARDS ARROW &darr; &#8595;
RIGHTWARDS ARROW &rarr; &#8594;
UPWARDS ARROW &uarr; &#8593;
LEFTWARDS ARROW &larr; &#8592;
TRADEMARK &trade; &#8482;
BLACK DIAMOND SUIT &#9830;

Example:

<!DOCTYPE html>
<html>
    <head>
        <title>HTML Entities</title>
    </head>
    <body>
        <p>Showing euro €</p>
        <p>Showing cent ¢</p>
        <p>Showing Copyright ©</p>
        <p>Showing BLACK DIAMOND SUIT ♦</p>
        <p>Showing TRADEMARK ™</p>
    </body>
</html>                    

Output



This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter