HTML and CSS Reference
In-Depth Information
Other Visual Enhancements
One way to help capture a Web page visitor's attention is to use color. Many
colors are available for use as a Web page background, text, border, or link. Figure 2-29
shows colors often used on Web pages, with the corresponding six-digit number codes.
The six-digit number codes, known as hexadecimal codes, can be used to specify a color
for a background, text, or links. The heading on the Rock Climbing Fun Web page is
currently black (the default color). You will spruce up the Web page by adding color to
the heading and the horizontal rule using inline styles.
Colors
Figure 2-29 does not list
all possible Web colors.
Many other colors are
available that you can use
for Web page backgrounds
or text fonts. For more
information about colors,
see Appendix B or search
the Web for browser
colors.
COLORS IN HEX
Here is a table of common colors with their hexadecimal equivalents. Use the codes to de ne
the desired color for the background, text, or links.
#ffc6a5
#ff9473
#ff6342
#ff3118
#ff0000
#d60000
#ad0000
#840000
#630000
#ffe7c6
#ffce9c
#ffb573
#ff9c4a
#ff8429
#d66321
#ad4a18
#844d18
#632910
#ffffc6
#ffff9c
#ffff6b
#ffff42
#ffff10
#d6c610
#ad9410
#847308
#635208
#f7ffce
#efef ad
#e7f784
#def763
#d6ef39
#b5bd31
#8c9429
#6b6b21
#524a18
#de93bd
#c6ef8c
#adde63
#94d639
#7bc618
#639c18
#527b10
#425a10
#314208
#ceefbd
#a5de94
#7bc66b
#52b552
#299c39
#218429
#186321
#184a18
#103910
#c6e7de
#94d6ce
#63bdb5
#31ada5
#089494
#087b7b
#006363
#004a4a
#003139
#c6eff7
#94d6e7
#63c6de
#31b5d6
#00a5c6
#0084a5
#006b84
#005263
#00394a
#bdc6de
#949cce
#6373b5
#3152a5
#083194
#082984
#08296b
#08215a
#00184a
#c6b5de
#9c7bbd
#7b52a5
#522994
#31007b
#29006b
#21005a
#21004a
#180042
#debdde
#ce84c6
#b552ad
#9c2994
#8c007b
#730063
#5a0052
#4a0042
#390031
#f7bdde
#e78cc6
#de5aad
#d63194
#ce007b
#a50063
#840052
#6b0042
#520031
#ffffff
#e0e0e0
#bfbfbf
#a1a1a1
#808080
#616161
#404040
#212121
#000000
THE SIXTEEN PREDEFINED COLORS
(Because these colors belong to the RGB spectrum, they will look a bit different on-screen.)
silver
gray
maroon
green
navy
purple
olive
teal
white
black
red
lime
blue
magenta
yellow
cyan
Figure 2-29
Browser-safe Colors
Web developers used to
have to make sure that
they used browser-safe
colors (Appendix B). The
trend for monitors today
is to display “true color”,
which means that any of
16 million colors can be
displayed on the monitor.
Few people use 8-bit
monitors anymore, so you
generally do not have to
limit yourself to browser-
safe colors.
The color codes and names shown in Figure 2-29 can be used for background, text,
border, and link colors. The color property is used in the <h2> tag to specify the color for
the heading. The color #384738 will be used for the heading because it is one of the colors
found in the graphical image inserted in the steps above.
Another way to visually enhance the Web page is to change the style of some of the
text. This calls attention to that particular text on the Web page. In this section, you will
change the text in the footer to an italic style using an inline style. This change helps call
attention to that tangential content.
 
Search WWH ::




Custom Search