Free beginner tutorial

CSS Tutorial for Beginners

CSS (Cascading Style Sheets) controls how HTML content looks, including its colors, spacing, typography and layout. This beginner guide introduces the core ideas and gives you small examples to try.

HTML provides the structure of a page; CSS describes its presentation. A stylesheet contains rules, and each rule selects one or more HTML elements and applies declarations such as color or spacing.

Connect CSS to an HTML page

Create a file named styles.css and link it inside the document head:

<link rel="stylesheet" href="styles.css">

Start with these CSS topics

Try each rule in a separate CSS file and refresh the browser to see how it changes the page.