Skip to main content
D
CSS
CSS Fonts

CSS Fonts

CSS changes the font family, size, and weight of text.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

CSS controls the actual typography used to display text. Developers can select specific font families, increase the font size, or make the text bold. Choosing the right font drastically impacts readability and design.

Example

Example
1/* this changes fonts */
2p {
3  font-family: Arial, sans-serif;
4  font-size: 16px;
5  font-weight: bold;
6}

Key Points

  • The `font-family` property sets the typeface.
  • The `font-size` property controls text scaling.
  • The `font-weight` property makes text bold.
  • Fallback fonts ensure the text always renders.

Up Next

Continue your journey with the next topic.

Go to CSS Icons