LESSON 1

What is CSS?

Learning objective: Understand what CSS is and why it is separate from HTML.

Understand

CSS (Cascading Style Sheets) controls how your HTML looks.

HTML gives a page structure; CSS gives it style — colors, spacing, fonts, and layout. Keeping style separate from structure means you can restyle a whole site without touching its content.

Analogy: If HTML is the skeleton, CSS is the skin, clothing, and style.

See It in Action

One CSS rule can color every paragraph:

p {
  color: navy;
}
How it works: This rule selects all <p> elements and sets their text color to navy.

Try It Yourself

  1. Add a <style> block to an HTML page.
  2. Turn all paragraphs a color you like.
  3. Change the color and refresh.

Quick Quiz

What is CSS responsible for?

Challenge

Style all headings on a page with a custom color.

Success condition: Every heading on your page shows your chosen color.