Font-weight part 2

The font-weight Property



You can also define the font weight with a number from 100 (thin) to 900 (thick), according to how thick you want the text to be. 
400 is the same as normal, and 700 is the same as bold. 

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

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

Result:
The HTML <strong> tag also makes the text bold.

Comments

Popular posts from this blog

font-family part 1