Starlit Daily

📚 › CSS: style and layout

4. Fonts and text style

इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।

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.

उदाहरण देखें

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

✍️ अब आपकी बारी

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

← कोर्स पर वापस