HTML and CSS Reference
In-Depth Information
EXAMPLE 14.9
<html>
<head><title>Cascading Style Sheets</title>
1 < style type="text/css" >
<!--
2 body { background-color: lightblue; }
3 p { background:yellow;
text-indent:5%;
margin-left: 20%;
margin-right: 20%;
border-width:10px;
border-style:groove;
padding: 15px;
font-family: times,arial;
font-size:150%;
font-weight:900 }
4 h1, h2, h3 {
text-align: center;
background:blue;
border-width:5px;
border-style:solid;
border-color:black;
margin-left:20%;margin-right:20%;
font-family:courier, arial;
font-weight:900;
color: white; }
5 h2,h3 { font-size:24; }
6 em { color: green;font-weight: bold }
-->
7 </style>
</head>
<body>
8 <div align="center"><h1>Stylin' Web Page</h1></div>
9 <p>HTML by itself doesn't give you much other than structure in
a page and there's no guarantee that every browser out there
will render the tags in the same way. So along came style
sheets. Style sheets enhance HTML as a word processor enhances
plain text. <p>But... no guarantees what a browser might do
with a style sheet, any more than what a stylist might do to
your hair, but we can hope for the best.
10 <h2><center>An H2 Element</center></h2>
<h3><center>An H3 Element</center></h3>
11 <p>This is not a <em>designer's dream style</em>, but it
illustrates the power.</p>
</body>
</html>
Search WWH ::




Custom Search