Web Lab Documentation

Font Size

Category:CSS Properties

Font Size

The font-size property specifies the size of a font.

Examples

Changing the Font Size

Setting the font size of a<p> element to 12px.

p {
  font-size: 12px; 
}

Syntax

font-size: value;

Tips

  • The default font size is medium (16px).

Additional Information

Found a bug in the documentation? Let us know at support@code.org.