Basic

From W3 CSS Font tutorial.

p {
    font-family: "Times New Roman", Times, serif;
}

p.italic {
    font-style: italic;
}

Weight

p.thick {
    font-weight: bold;
}

Size

Font size

p {
    font-size: 40px;
}

e.g.

  • 40px
  • 100%
  • larger
  • 2.5em

For a button:

button.btn-large {
  font-size: larger;
}

Font size adjust

p {
    font-size-adjust: 1;
}

e.g.

  • 0.5 - this seemeded close to default with no styling set.
  • 1
  • 2

Web font

For example, the Poppins by Google.

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap" rel="stylesheet"> 

Import

<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');
</style>