CSS (Cascading Style Sheets) is a stylesheet language that describes how HTML elements should look. It sets colors, fonts, spacing, layout and responsive behavior.
Why it matters
Separating style from structure lets one stylesheet control hundreds of pages. CSS is also render-blocking: the browser waits for it before painting, so large or slow stylesheets delay what visitors see and affect performance measures such as Largest Contentful Paint.
Inlining a small amount of critical CSS and loading the rest asynchronously is a common technique to speed up first paint on slow connections.
Example
body { font-family: system-ui, sans-serif; }
.button { background: #0a66c2; color: #fff; padding: 0.5rem 1rem; }
@media (max-width: 600px) { .button { width: 100%; } }
The media query changes the button on narrow screens.
Common mistakes
- Shipping one huge stylesheet with unused rules, slowing the first paint.
- Using
!importantto win specificity fights instead of organizing selectors. - Forgetting to set a viewport and testing only at desktop width.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.