Starlit Daily

📚 › CSS: style and layout

3. Colours and text

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

Colours can be a name such as red, a hex code such as #1e90ff, or rgb(30, 144, 255). color sets the text colour and background-color sets the background.

font-size changes text size. px is fixed pixels; rem is relative to the root font size, which makes text easier to scale.

उदाहरण देखें

p {
  color: #1e3a8a;
  font-size: 1.1rem;
}

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

Give the .note class a yellow background and a font size of 20px.

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