Starlit Daily

📚 › CSS: style and layout

4. Fonts and text style

Este artículo se traducirá automáticamente. Por ahora se muestra en inglés.

font-family lists fonts in order of preference, ending with a generic family such as sans-serif. font-weight: bold makes text heavier. text-align aligns text, and line-height sets the space between lines.

A line-height around 1.5 makes long paragraphs comfortable to read.

Ver ejemplo

body {
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}
h2 {
  font-weight: bold;
  text-align: center;
}

✍️ Ahora te toca

Give the .title class bold text, center alignment, and a line-height of 1.6.

← Volver al curso