Font-family part 1

CSS Fundamentals
Working with Text
font-weight
36
1/2
         

The font-weight Property



The font-weight controls the boldness or thickness of the text. The values can be set as normal (default size), boldbolder, and lighter.

The HTML:<p class="light">This is a font with a "lighter" weight.</p>
<p class="bold">This is a font with a "bold" weight.</p>
<p class="bolder">This is a font with a "bolder" weight.</p>

The CSS:
p.light {
font-weight: lighter;
}
p.bold {
font-weight: bold;
}
p.bolder {
font-weight: bolder;
}
Try It Yourself

Result:
Tap Try It Yourself to play around with the code!

Comments

Popular posts from this blog

font-family part 1