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.

Build modern and responsive webpages

Responsive Typography

Build modern and responsive webpages Try Front-end

Responsive web design helps your site maintain its design integrity on a variety of screen sizes, but how does it affect your typography? With this practical book, graphic designers, web designers, and front-end developers alike will learn the nuts and bolts of how to get the best appearance from type without sacrificing performance on any device.

$ Check price
24.9924.99Amazon 4.5 logo(3+ reviews)

More Front-end resources

Aching back from coding all day?

Self-Massage Tool

Aching back from coding all day? Try Back Problems

Relieve spasms, tight muscles, trigger points and pressure points with the Body Back Buddy! This trigger point massage is designed to help you self-message any area of your body - especially those that are hard to reach. Keeping your muscles relaxes and out of contraction is importan in helping to reduce pain and prevent muscle injury.

$ Check price
29.9529.95Amazon 4.5 logo(3,443+ reviews)

More Back Problems resources

Ad