CSS
Also known as: CSS file, .css, Cascading Style Sheets
CSS (Cascading Style Sheets) is the text-based language that controls how web pages look — colors, fonts, spacing, and layout. It separates a page’s visual design from its HTML structure.
- Controls colors, fonts, spacing, and layout
- Separates visual design from HTML structure
- Rules combine and override by the cascade
How CSS works
CSS uses rules that pair a selector (which elements to target) with declarations (what to change), such as `color`, `font-size`, or `margin`. Keeping styling in CSS lets one stylesheet restyle an entire site without touching the HTML.
“Cascading” refers to how styles combine and override each other by source and specificity, so the most specific rule wins when several apply to the same element.
CSS and HTML
HTML provides the content and structure; CSS provides the presentation layer on top. A `.css` file is plain text, usually linked from an HTML page so the same styles apply across many pages.