- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML - Color Names
The following table shows the 16 color names that were introduced in HTML 3.2 −
Color Name | Hex Value | Color | Show |
---|---|---|---|
aqua | #00ffff | Demo | |
black | #000000 | Demo | |
blue | #0000ff | Demo | |
fuchsia | #ff00ff | Demo | |
green | #008000 | Demo | |
gray | #808080 | Demo | |
lime | #00ff00 | Demo | |
maroon | #800000 | Demo | |
navy | #000080 | Demo | |
olive | #808000 | Demo | |
purple | #800080 | Demo | |
red | #ff0000 | Demo | |
silver | #c0c0c0 | Demo | |
teal | #008080 | Demo | |
white | #ffffff | Demo | |
yellow | #ffff00 | Demo |
There are other colors which are not part of HTML or XHTML but they are supported by most of the versions of major browsers.
Color Name | Hex Value | Color | Show |
---|---|---|---|
aliceblue | #f0f8ff | Demo | |
antiquewhite | #faebd7 | Demo | |
aquamarine | #7fffd4 | Demo | |
azure | #f0ffff | Demo | |
beige | #f5f5dc | Demo | |
bisque | #ffe4c4 | Demo | |
blanchedalmond | #ffebcd | Demo | |
blueviolet | #8a2be2 | Demo | |
brown | #a52a2a | Demo | |
burlywood | #deb887 | Demo | |
cadetblue | #5f9ea0 | Demo | |
chartreuse | #7fff00 | Demo | |
chocolate | #d2691e | Demo | |
coral | #ff7f50 | Demo | |
cornflowerblue | #6495ed | Demo | |
cornsilk | #fff8dc | Demo | |
crimson | #dc143c | Demo | |
cyan | #00ffff | Demo | |
darkblue | #00008b | Demo | |
darkcyan | #008b8b | Demo | |
darkgoldenrod | #b8860b | Demo | |
darkgray | #a9a9a9 | Demo | |
darkgreen | #006400 | Demo | |
darkkhaki | #bdb76b | Demo | |
darkmagenta | #8b008b | Demo | |
darkolivegreen | #556b2f | Demo | |
darkorange | #ff8c00 | Demo | |
darkorchid | #9932cc | Demo | |
darkred | #8b0000 | Demo | |
darksalmon | #e9967a | Demo | |
darkseagreen | #8fbc8f | Demo | |
darkslateblue | #483d8b | Demo | |
darkslategray | #2f4f4f | Demo | |
darkturquoise | #00ced1 | Demo | |
darkviolet | #9400d3 | Demo | |
deeppink | #ff1493 | Demo | |
deepskyblue | #00bfff | Demo | |
dimgray | #696969 | Demo | |
dodgerblue | #1e90ff | Demo | |
firebrick | #b22222 | Demo | |
floralwhite | #fffaf0 | Demo | |
forestgreen | #228b22 | Demo | |
gainsboro | #dcdcdc | Demo | |
ghostwhite | #f8f8ff | Demo | |
gold | #ffd700 | Demo | |
goldenrod | #daa520 | Demo | |
gray | #808080 | Demo | |
greenyellow | #adff2f | Demo | |
honeydew | #f0fff0 | Demo | |
hotpink | #ff69b4 | Demo | |
indianred | #cd5c5c | Demo | |
indigo | #4b0082 | Demo | |
ivory | #fffff0 | Demo | |
khaki | #f0e68c | Demo | |
lavender | #e6e6fa | Demo | |
lavenderblush | #fff0f5 | Demo | |
lawngreen | #7cfc00 | Demo | |
lemonchiffon | #fffacd | Demo | |
lightblue | #add8e6 | Demo | |
lightcoral | #f08080 | Demo | |
lightcyan | #e0ffff | Demo | |
lightgoldenrodyellow | #fafad2 | Demo | |
lightgreen | #90ee90 | Demo | |
lightgrey | #d3d3d3 | Demo | |
lightpink | #ffb6c1 | Demo | |
lightsalmon | #ffa07a | Demo | |
lightseagreen | #20b2aa | Demo | |
lightskyblue | #87cefa | Demo | |
lightslategray | #778899 | Demo | |
lightsteelblue | #b0c4de | Demo | |
lightyellow | #ffffe0 | Demo | |
limegreen | #32cd32 | Demo | |
linen | #faf0e6 | Demo | |
magenta | #ff00ff | Demo | |
mediumblue | #0000cd | Demo | |
mediumorchid | #ba55d3 | Demo | |
mediumpurple | #9370db | Demo | |
midnightblue | #191970 | Demo | |
mistyrose | #ffe4e1 | Demo | |
moccasin | #ffe4b5 | Demo | |
oldlace | #fdf5e6 | Demo | |
orange | #ffa500 | Demo | |
orchid | #da70d6 | Demo | |
peachpuff | #ffdab9 | Demo | |
peru | #cd853f | Demo | |
pink | #ffc0cb | Demo | |
plum | #dda0dd | Demo | |
purple | #800080 | Demo | |
rosybrown | #bc8f8f | Demo | |
royalblue | #4169e1 | Demo | |
salmon | #fa8072 | Demo | |
sandybrown | #f4a460 | Demo | |
seagreen | #2e8b57 | Demo | |
sienna | #a0522d | Demo | |
skyblue | #87ceeb | Demo | |
slateblue | #6a5acd | Demo | |
steelblue | #4682b4 | Demo | |
tan | #d2b48c | Demo | |
thistle | #d8bfd8 | Demo | |
tomato | #ff6347 | Demo | |
violet | #ee82ee | Demo | |
wheat | #f5deb3 | Demo | |
whitesmoke | #f5f5f5 | Demo | |
yellow | #ffff00 | Demo | |
yellowgreen | #9acd32 | Demo |
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.
Symbol | Description | Entity Name | Number Code |
---|---|---|---|
" | quotation mark | " | " |
' | apostrophe | ' | ' |
& | ampersand | & | & |
< | less-than | < | < |
> | greater-than | > | > |
Example
If you want to write <div id = "character"> as a code, then you will have to write as follows −
<!DOCTYPE html> <html> <head> <title>HTML Entities</title> </head> <body> <div id = "character"> </body> </html>
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 −
© 2007 or © 2007
ISO 8859-1 Symbol Entities
Result | Description | Entity Name | Number Code |
---|---|---|---|
non-breaking space | |   | |
¡ | inverted exclamation mark | ¡ | ¡ |
¤ | currency | ¤ | ¤ |
¢ | cent | ¢ | ¢ |
£ | pound | £ | £ |
¥ | yen | ¥ | ¥ |
¦ | broken vertical bar | ¦ | ¦ |
§ | section | § | § |
¨ | spacing diaeresis | ¨ | ¨ |
© | copyright | © | © |
ª | feminine ordinal indicator | ª | ª |
« | angle quotation mark (left) | « | « |
¬ | negation | ¬ | ¬ |
| soft hyphen | ­ | ­ |
® | registered trademark | ® | ® |
™ | trademark | ™ | ™ |
¯ | spacing macron | ¯ | ¯ |
° | degree | ° | ° |
± | plus-or-minus | ± | ± |
² | superscript 2 | ² | ² |
³ | superscript 3 | ³ | ³ |
´ | spacing acute | ´ | ´ |
µ | micro | µ | µ |
¶ | paragraph | ¶ | ¶ |
· | middle dot | · | · |
¸ | spacing cedilla | ¸ | ¸ |
¹ | superscript 1 | ¹ | ¹ |
º | masculine ordinal indicator | º | º |
» | angle quotation mark (right) | » | » |
¼ | fraction 1/4 | ¼ | ¼ |
½ | fraction 1/2 | ½ | ½ |
¾ | fraction 3/4 | ¾ | ¾ |
¿ | inverted question mark | ¿ | ¿ |
× | multiplication | × | × |
÷ | division | ÷ | ÷ |
ISO 8859-1 Character Entities
Result | Description | Entity Name | Number Code |
---|---|---|---|
À | capital a, grave accent | À | À |
Á | capital a, acute accent | Á | Á |
 | capital a, circumflex accent |  |  |
à | capital a, tilde | à | à |
Ä | capital a, umlaut mark | Ä | Ä |
Å | capital a, ring | Å | Å |
Æ | capital ae | Æ | Æ |
Ç | capital c, cedilla | Ç | Ç |
È | capital e, grave accent | È | È |
É | capital e, acute accent | É | É |
Ê | capital e, circumflex accent | Ê | Ê |
Ë | capital e, umlaut mark | Ë | Ë |
Ì | capital i, grave accent | Ì | Ì |
Í | capital i, acute accent | Í | Í |
Î | capital i, circumflex accent | Î | Î |
Ï | capital i, umlaut mark | Ï | Ï |
Ð | capital eth, Icelandic | Ð | Ð |
Ñ | capital n, tilde | Ñ | Ñ |
Ò | capital o, grave accent | Ò | Ò |
Ó | capital o, acute accent | Ó | Ó |
Ô | capital o, circumflex accent | Ô | Ô |
Õ | capital o, tilde | Õ | Õ |
Ö | capital o, umlaut mark | Ö | Ö |
Ø | capital o, slash | Ø | Ø |
Ù | capital u, grave accent | Ù | Ù |
Ú | capital u, acute accent | Ú | Ú |
Û | capital u, circumflex accent | Û | Û |
Ü | capital u, umlaut mark | Ü | Ü |
Ý | capital y, acute accent | Ý | Ý |
Þ | capital THORN, Icelandic | Þ | Þ |
ß | small sharp s, German | ß | ß |
à | small a, grave accent | à | à |
á | small a, acute accent | á | á |
â | small a, circumflex accent | â | â |
ã | small a, tilde | ã | ã |
ä | small a, umlaut mark | ä | ä |
å | small a, ring | å | å |
æ | small ae | æ | æ |
ç | small c, cedilla | ç | ç |
è | small e, grave accent | è | è |
é | small e, acute accent | é | é |
ê | small e, circumflex accent | ê | ê |
ë | small e, umlaut mark | ë | ë |
ì | small i, grave accent | ì | ì |
í | small i, acute accent | í | í |
î | small i, circumflex accent | î | î |
ï | small i, umlaut mark | ï | ï |
ð | small eth, Icelandic | ð | ð |
ñ | small n, tilde | ñ | ñ |
ò | small o, grave accent | ò | ò |
ó | small o, acute accent | ó | ó |
ô | small o, circumflex accent | ô | ô |
õ | small o, tilde | õ | õ |
ö | small o, umlaut mark | ö | ö |
ø | small o, slash | ø | ø |
ù | small u, grave accent | ù | ù |
ú | small u, acute accent | ú | ú |
û | small u, circumflex accent | û | û |
ü | small u, umlaut mark | ü | ü |
ý | small y, acute accent | ý | ý |
þ | small thorn, Icelandic | þ | þ |
ÿ | small y, umlaut mark | ÿ | ÿ |
Other Entities Supported by HTML Browsers
Result | Description | Entity Name | Number Code |
---|---|---|---|
Œ | capital ligature OE | Œ | Œ |
œ | small ligature oe | œ | œ |
Š | capital S with caron | Š | Š |
š | small S with caron | š | š |
Ÿ | capital Y with diaeres | Ÿ | Ÿ |
ˆ | modifier letter circumflex accent | ˆ | ˆ |
˜ | small tilde | ˜ | ˜ |
en space |   |   | |
em space |   |   | |
thin space |   |   | |
| zero width non-joiner | ‌ | ‌ |
| zero width joiner | ‍ | ‍ |
| left-to-right mark | ‎ | ‎ |
| right-to-left mark | ‏ | ‏ |
– | en dash | – | – |
— | em dash | — | — |
‘ | left single quotation mark | ‘ | ‘ |
’ | right single quotation mark | ’ | ’ |
‚ | single low-9 quotation mark | ‚ | ‚ |
“ | left double quotation mark | “ | “ |
” | right double quotation mark | ” | ” |
„ | double low-9 quotation mark | „ | „ |
† | dagger | † | † |
‡ | double dagger | ‡ | ‡ |
… | horizontal ellipsis | … | … |
‰ | per mille | ‰ | ‰ |
‹ | single left-pointing angle quotation | ‹ | ‹ |
› | single right-pointing angle quotation | › | › |
€ | euro | € | € |