# Cascading Style Sheets (CSS)

> The language for how a web page looks. It sets colours, fonts, sizes and layout.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** CSS, CSS3, Stylesheet

## Think of it like

Think of it like the clothes and paint on a house. The house is the same, but it can look any way you like.

## Definition

CSS is the language that sets how a web page looks. It picks parts of the page and gives them colours, sizes, fonts and places. One CSS file can style every page on a site, so a change in one place shows up everywhere. It also lets a page change its layout for phones and big screens. When two rules clash, a set of rules called the cascade decides which wins.

## Example

Jack changes one line of CSS and every button on his site turns green.

## Example code

```css
button {
  background: green;
  color: white;
  padding: 8px 16px;
}
```

Every button on the page gets a green background and white text.

## Why it matters

CSS turns plain text into a page people want to use. It also makes sites work on phones.

## Common mistake

Fighting a rule by piling on !important. Work out why the other rule wins instead.

## Three principles

- **Looks only.** HTML holds the content.
- **One file, many pages.** Change once, see it everywhere.
- **The cascade.** Decides which rule wins.

## Related terms

- [HyperText Markup Language (HTML)](https://learn.benibix.com/term/development/html)
- [Front End](https://learn.benibix.com/term/development/front-end)
- [Document Object Model (DOM)](https://learn.benibix.com/term/development/dom)
- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [CSS Selector](https://learn.benibix.com/term/development/css-selector)
- [CSS Box Model](https://learn.benibix.com/term/development/css-box-model)
- [Flexbox](https://learn.benibix.com/term/development/flexbox)

## Taught in

- [CSS Selectors and Specificity](https://learn.benibix.com/learn/development-web/css-selectors-and-specificity): HTML, CSS and JS, 7/14

---

Source: https://learn.benibix.com/term/development/css
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
