HTML and CSS Reference
In-Depth Information
Table 3-8 CSS Code for an Embedded Style Sheet
Line
CSS Selectors and Declarations
7
<style type=”text/css”>
8
<!--
9
10
body
{font-family: Arial, Verdana, Garamond;
11
font-size: 11pt;}
12
13
h1, h2, h3
{color: #020390;}
14
15
a
{text-decoration: none;
16
color: #020390;}
17
18
a:hover {background: #020390;
19
color: #01d3ff;}
20
21
-->
22
</style>
The following step shows how to enter the embedded style sheet code to change h1, h2, and h3 headings to
blue, change all links to blue with no text-decoration, and change the color of the link hover to a dark blue back-
ground with light blue text to provide visual impact.
1
the right of the > in
</title> on line 6 and
press the e n t e r key.
Click immediately to
Table 3-8
but do not
press the
e n t e r key
at the end of
line 22
(Figure 3-21).
Type the code in
style sheet to
change font-
family and size
style sheet
to change
h1, h2, and
h3 headings
to blue
embedded
style sheet
What other
styles can I
use on my
Web pages?
Appendix D
lists available
CSS properties and
values. You can also
search the Web for
examples of how CSS
are used for Web development. Finally, be an active Web page visitor and review the source code on Web pages with
styles that you think are particularly effective or ineffective.
style sheet
to change
all links to
blue with
no text-
decoration
style sheet that
changes link hover to
dark blue background
and light blue text
Figure 3-21
 
Search WWH ::




Custom Search