An id is a unique selector. You can only use a particular value for and id once on a page.
You can use the same value for a class as many times as you would like.
You can also use them together.
p.body {
font: 14px/120% arial, sans-serif;
margin: 4px auto;
color: #000;
text-indent: 6px;
}
#first-para {
font-weight: bold;
}
and then:
<p class="body" id="first-para">
You can set most all of your properties for all of your body paragraphs within p.body and just the properties that are different for the first paragraph have to be defined within #first-para.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment