HTML and CSS Reference
In-Depth Information
EXPLANATION
1
A specific class selector is defined to describe the style of a paragraph's font, and
only a paragraph.
2
Another class selector is defined for a paragraph's font.
3
Now to use the class with the <p> tag, the class name is specified and the text will
be printed in cursive.
4
The class for this paragraph will style the text in small capital letters. Output is
shown in Figure 14.16.
Figure 14.16 Using the class selector to style a paragraph.
EXAMPLE 14.16
<html>
<head>
<style type="text/css">
1
ul.disc {list-style-type: disc}
ul.circle {list-style-type: circle}
ul.square {list-style-type: square}
ul.none {list-style-type: none}
</style>
</head>
<body bgcolor="aquamarine">
2
<ul class="disc">
<li>Coffee</li>
<li>Tea</li>
<li>Beer</li>
</ul>
<ul class="circle">
<li>red</li>
<li>blue</li>
<li>yellow</li>
</ul>
Continues
 
Search WWH ::




Custom Search