Lesson 1: What Is CSS and How Does It Work?

Now that you’ve learned how to structure your content with HTML, it’s time to make your webpage visually appealing. In this module, we’ll dive into CSS (Cascading Style Sheets), which allows you to control the layout, colors, fonts, and overall design of your site.
By the end of this module, you’ll be able to style your website like a pro!


What Is CSS?

CSS is a stylesheet language used to describe the look and formatting of an HTML document. It enables you to separate content (HTML) from presentation (CSS).

How CSS Works

CSS styles are applied to HTML elements using selectors and properties.

Basic Syntax:

selector {
  property: value;
}

Example:
To make all paragraphs blue:

p {
  color: blue;
}