A Complete Guide to Web Design

(やまだぃちぅ) #1
84 Chapter 5 – HTML Overview

Character Entities


Web Design in a Nutshell, eMatter Edition

Coloring Page Elements


Table 5-4 lists the HTML elements for which you can specify a color. Each tag’s
use is further explained in Chapters 6, 7, and 10 of this book.

Character Entities


Characters not found in the normal alphanumeric character set, such as © or &,
must be specified in HTML usingcharacter entities. Using keyboard commands
(such as Option-g for the © symbol) within your HTML document will not
produce the character when the document is rendered in a browser (in fact, the
browser will generally display the numeric entity for the character).
Character entities can be defined by name (&name;) or by numeric value
(&#nnn;). The browser interprets the string to display the proper character.
Named entities are preferable because numeric values may be interpreted differ-
ently on different platforms.

Purples
blueviolet
darkmagenta
darkorchid
darkviolet
fuchsia
lavender
lavenderblush
mediumorchid
mediumpurple
mediumvioletred
orchid

palevioletred
plum
purple
thistle
violet

Pinks
coral
darksalmon
deeppink
hotpink
lightcoral
lightpink

lightsalmon
magenta
mistyrose
pink
salmon

Reds
crimson
darkred
firebrick
indianred
maroon
red

Table 5-4: Summary of HTML Tags with Color Attributes

Tag Attribute Description
<BODY> BGCOLOR=color Document background
<BODY> TEXT=color Regular text
<BODY> LINK=color Hypertext link
<BODY> VLINK=color Visited link
<BODY> ALINK=color Active link
<FONT> COLOR=color Colors a selection of text
<BASEFONT> COLOR=color Colors the following block of text (IE only)
<TR> BGCOLOR=color Table row background
<TD> BGCOLOR=color Table cell background
<TH> BGCOLOR=color Table header background

Table 5-3: Web Color Names by Hue (continued)
Free download pdf