Skip to content
BENIBIX Learn

Cascading Style Sheets (CSS)

Development🌐 Web DevelopmentBrowser Code

Also known as CSS, CSS3, Stylesheet

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

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.

Example

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

Why it matters

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

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 code

css
button {
  background: green;
  color: white;
  padding: 8px 16px;
}
Every button on the page gets a green background and white text.

Common mistake

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

Key takeaways

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

Learn it properly