CSS — an introduction
styling a website using a design language
// updated 2025-05-14 18:00
Cascading style sheets (CSS) refers to an internet design language that facilitates the look and feel of a website and its components.
CSS looks like this:
1h1 {
2 font-size: 48px;
3 color: red;
4}
5
6h2 {
7 font-size: 24px;
8 color: blue;
9 margin-bottom: 30px;
10}
11
12.overlapping {
13 position: absolute;
14 top: 0;
15 z-index: 10000;
16}
Thus, each chunk of CSS code typically consists of a:
- Selector
- a grouping of HTML objects
- i.e. everything before the curly braces
- a grouping of HTML objects
- Declaration (or declarations)
- a pair or pairs of properties and values
- i.e. everything inside the curly braces
- a pair or pairs of properties and values
Topics
- Introduction
- 🎨🛡️ CSS in HTML
- CSS in an HTML page
- What "CSS" means
- 🎨🛡️ CSS in HTML
- CSS basics
- 🎨 ✅ Selectors
- styling HTML elements
- 🎨 🌈 Colors
- ways to represent different hues
- 🎨 📦 Box model
- spacing (margins + borders + paddings)
- 🎨 🔲 Layout properties
- arranging things on a browser window
- 🎨 🔌 Reset
- avoiding browser-defined defaults
- 🎨 📲 Media queries
- different styles for different devices
- 🎨 ✅ Selectors
- CSS layouts