CSS

Style websites with confidence

100% free · no signup to read 36 chapters Programming language

Created

1996 by Håkon Wium Lie

Type

Stylesheet language

Pairs with

HTML (structure) + JS (behaviour)

Current version

CSS3 (modular since 2011)

Used by

Every website on the internet

Key concept

Cascading specificity

File extension

.css

Best for

Styling web pages

What is CSS?

CSS (Cascading Style Sheets) controls how HTML elements look — colours, fonts, spacing, layout, animations, and responsive design. It's the presentation layer of every website.

Why CSS?

Without CSS, every web page looks like plain black text on a white background. CSS lets you create beautiful, responsive, branded interfaces.

Feature CSS Inline styles CSS-in-JS
Reusability ✅ Classes, IDs ❌ One element at a time ✅ Component-scoped
Maintainability ✅ Separate file ❌ Scattered in HTML ⚠️ Mixed with JS
Performance ✅ Cached by browser ❌ Re-downloaded per page ⚠️ Runtime overhead
Responsive design ✅ Media queries ❌ Impossible ⚠️ Possible

What you'll learn

Chapter What you'll know
Introduction What CSS is and how it works
Syntax Rules, properties, values
Selectors Targeting elements precisely
Colors Hex, RGB, HSL, opacity
Box Model Padding, borders, margins
Try It Live editor to experiment

Start with introduction.