13. <style type=quot;text/cssquot;>
.new { color: #FF0000;
font-style: italic;
}
</style>
<p class=“new”>This is text is red and in italics</p>
26
13
14. <style type=quot;text/cssquot;>
#new { color: #FF0000;
font-size:2em;
font-style: italic;
}
</style>
<p id=“new”>This is text is red, large, and in italics</p>
27
28
14
16. 4 52 *
' 2 *'
0
2* .
<style type=quot;text/cssquot;>
.companyname { font-weight: bold;
font-family: Georgia, quot;Times New Romanquot;, serif;
font-size: 1.25em;
}
</style>
.
<p>Your needs are important to us at <span
class=“companynamequot;>Acme Web Design</span>.
We will work with you to build your Web site.</p>
31
20 ' '/
Multiple web pages can associate with
the same external style sheet file.
site.css
index.htm
body {background-color:#E6E6FA;
color:#000000;
font-family:Arial, sans-serif;
clients.htm
font-size:90%; }
h2 { color: #003366; }
.nav { font-size: 16px; about.htm
font-weight: bold; }
etc…
32
16
17. <link rel=quot;stylesheetquot; href=quot;color.cssquot; type=quot;text/cssquot; />
33
3quot; 2
(0 ' '/
body { background-color: #0000FF;
color: #FFFFFF;
}
To link to the external style sheet called color.css, the
XHTML code placed in the header section is:
<link rel=quot;stylesheetquot; href=quot;color.cssquot; type=quot;text/cssquot; />
17
18. 9- ,
quot;
1. Can you provide a reason to use embedded
styles? Where are embedded styles placed on a
web page?
2. Can you describe a reason to use external
styles? Where are external styles laced and how
do web pages indicate they are using external
styles?
3. Can you write the code to configure a web page
to use an external style sheet called
“mystyles.css”?
35
quot; 1(
( ,/
quot;
#container { margin-left: auto;
margin-right: auto;
width:80%; }
18