Skip to the page
css reference · color & type

CSS font-weight & line-height

type
property
applies to
any element containing text
inherits
yes
common values
font-weight: 400/700; line-height: 1.5, 24px

Where it goes

font-weight wherever text needs emphasis. line-height on body text, so long passages are easy to read.

Example

p {
  font-weight: 400;
  line-height: 1.6;
}

Common mistakes

  • Using a weight the font file does not include. The browser fakes it by thickening the letters, and it looks noticeably worse than a real bold.
  • Leaving line-height at the browser default for body text. Tight lines in a dense paragraph are harder to read.

Related

Updated 24 October 2026. Practice it in the css route, or read more on MDN.