The font-size CSS property specifies the size of the font. Setting the font size may, in turn, change the size of other items, since it is used to compute the value of em and ex length units.


  font-size: xx-small /* values */
  font-size: x-small
  font-size: small
  font-size: medium
  font-size: large
  font-size: x-large
  font-size: xx-large

  font-size: larger /* values */
  font-size: smaller

  font-size: 12px /* values */
  font-size: 0.8em

  font-size: 80% /* values */

  font-size: inherit

<!DOCTYPE html>
            .small {
                font-size: xx-small;
            } .larger {
                font-size: larger;
            } .point {
                font-size: 24pt;
            } .percent {
                font-size: 200%;
        <h1 class="small">Small H1</h1>
        <h1 class="larger">Larger H1</h1>
        <h1 class="point">24 point H1</h1>
        <h1 class="percent">200% H1</h1>