CSS — an introduction
styling a website using a design language
// updated 2025-05-09 12:35
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:
h1 {
font-size: 48px;
color: red;
}
h2 {
font-size: 24px;
color: blue;
margin-bottom: 30px;
}
.overlapping {
position: absolute;
top: 0;
z-index: 10000;
}
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