HTML and CSS Reference
In-Depth Information
Now that you've got one external style file (or “stylesheet”), use it to change
all the paragraph fonts to “sans-serif” to match the headings. Remember, the
property to change the font style is “font-family”, and the value for sans-serif
font is “sans-serif”. Here's our solution.
h1, h2 {
font-family: sans-serif;
color:
gray;
}
h1 {
border-bottom: 1px solid black;
}
p {
Just a dd a font-family prop erty
to you r paragraph rule in th e
“lounge .css” file.
font-family: sans-serif;
color:
maroon;
}
I'm wondering if that is really the best
solution. Why are we specifying the font-family
for EACH element? What if someone added a
<blockquote> to the page—would we have to then
add a rule for that too? Can't we just tell the
whole page to be sans-serif?
Search WWH ::




Custom Search