Codeloft
0 0 XP

Color and fonts

6 min 20 XP + 10 for no hints

CSS describes how things look. A CSS rule has a selector that picks elements, and declarations that set properties.

h1 { color: teal; } means "make every h1 teal". Each declaration is a property, a colon, a value and a semicolon.

Rules go inside a <style> element. Try color, font-size and font-family.

Example
<style>
  h1 { color: crimson; font-family: Georgia, serif; }
  p { font-size: 20px; }
</style>
<h1>Hello</h1>
<p>Styled with CSS.</p>
Colors can be names like teal, hex codes like #2445d6, or rgb(36, 69, 214).

Your tasks

0 of 2 done
  1. Give the heading a color
  2. Make the paragraph text at least 18px

Quick check

In h1 { color: teal; }, which part is the selector?

notes.htmlUpdates as you type