05. Applying Styles to your Font bolding, italicizing

Now we can begin to style and decorate our fonts!

Bolding Text

For bolding, we use the font-weight property.

The values range from 100 to 900 in increments of 100. You may also place predefined values such as lighter, normal (same as 400), bold (700) and bolder.

p {
  font-style: bolder;
}

Italicizing Text

For italics, we use the font-style property.

Values include normal, italic and oblique.

Oblique is different from italic, in that it distorts the glyphs.

a {
  font-style: italic;
}

What about em/strong?

Wait a second...But I learned that em/strong is used for italicizing and bolding! Yes...and no.

The emphasis and strong tags indeed have a italics/bold default set on browsers, but should only be used for semantics. This means that you should only use them to actually emphasize a word or text, not just to bold or italice it for style.

Aching back from coding all day?

Foam Seat Cushion

Aching back from coding all day? Try Back Problems

This foam seat cushion relieves lowerback pain, numbness and pressure sores by promoting healthy weight distribution, posture and spine alignment. Furthermore, it reduces pressure on the tailbone and hip bones while sitting. Perfect for sitting on the computer desk for long periods of time.

$ Check price
99.9599.95Amazon 4.5 logo(9,445+ reviews)

More Back Problems resources

Build modern and responsive webpages

The Modern Web

Build modern and responsive webpages Try Front-end

The Modern Web will guide you through the most important tools of device-agnostic web development, including HTML5, CSS3, and JavaScript. The plain-english explanations and practical examples emphasize the techniques, principles, and practices that you'll need to easily transcend individual browser quirks and stay relevant as these technologies are updated.

$ Check price
34.9534.95Amazon 4.5 logo(30+ reviews)

More Front-end resources

Ad