Code Editor
Web Browser

Font Weight

You've probably noticed bolded text across many different web sites. It's common to bold important headings or keywords.

In CSS, the font-weight property turns bold on or off.

p { font-weight: bold; }

In the example above, all paragraphs on the web page would appear bolded.

The font-weight property has a second value: normal. Why does it exist?

If we wanted all text on a web page to appear bolded, we could select all text elements and change their font weight to bold. If a certain section of text was required to appear normal, however, we could set the font weight of that particular element to normal, essentially "shutting off" bold for that element.

In later units, you'll learn how to be more selective about what parts of your site you'd like to style.

Report a Bug
If you see a bug or any other issue with this page, please report it here.