Chapter 1. Understanding CSS

In this lesson, you will learn about Cascading Style Sheets and why you should use them.

What Is CSS?

Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation is specified with styles that are placed directly into HTML elements, the head of the HTML document, or separate style sheets.

Style sheets contain a number of CSS rules. Each rule selects elements in an HTML document. These rules then define how the elements will be styled.

Any number of HTML files can be linked to a single CSS file.

What Does Cascading Mean?

There are three types of style sheets that can influence the presentation of an HTML document in a browser. These are

  • Browser style sheets ...

Get Sams Teach Yourself CSS in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.