Skip to content

Challenge Set the Font Family of an Element

SaintPeter edited this page · 1 revision
Clone this wiki locally

Font family is controlled by the font-family CSS attribute, like this h1 {font-family: Sans-serif;}

It allows you to pick a font to display to the user.

More font-family examples can be viewed at MDN

Note: Keep in mind that different computers and browsers will have different fonts enabled. Commonly available fonts are called Web Safe

 p {
    font-size: 16px;
    font-family: Monospace;
  }
Something went wrong with that request. Please try again.