Learning overview
- Estimated time
- 4 minutes
- Difficulty
- Beginner
- Prerequisites
- No prior experience required
- Learning outcome
- Explain css using a clear mental model · Apply css in practical CSS work
- Last updated
- July 18, 2026
Definition of CSS
CSS, or Cascading Style Sheets, is the language browsers use to describe the presentation and layout of HTML and XML documents.
A stylesheet contains rules made from selectors and declaration blocks. Matching declarations enter the cascade, which resolves conflicts and produces computed values. Those values influence generated boxes, text, layout, paint, and animation. CSS is resilient: browsers ignore declarations they do not understand while preserving valid rules.
CSS rule example
This rule matches elements with the card class, applies reusable values, and creates a flexible Grid whose columns adapt to available width.
:root { --space: 1rem; --radius: 0.75rem; }
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
gap: var(--space);
}
.card {
padding: var(--space);
border: 1px solid #d8deea;
border-radius: var(--radius);
}What to remember
Think of CSS as a constraint and conflict-resolution system, not a list of visual commands. Selectors choose candidates, the cascade chooses values, and layout algorithms place the resulting boxes.
Frequently asked questions
What does cascading mean in CSS?
It is the ordered process that resolves competing declarations using origin, importance, layers, specificity, scoping proximity, and source order.
What is a CSS declaration?
A declaration is a property-value pair such as display: grid. Declarations appear inside declaration blocks and may participate in the cascade.
Is CSS a programming language?
CSS is primarily a declarative styling language. Modern CSS includes variables, conditions, calculations, and sophisticated layout logic, but it is not a general-purpose imperative language.
Topic graph
A taxonomy-generated path through this subject.
Related courses
Related learning
Recommended automatically from shared technologies, topics, intent, and difficulty.
Related Guides
Related Tutorials
Related Glossary
Related Cheatsheets
Related Projects
Related Interview Questions
Related reading
Hand-picked companion pages that deepen this topic.
Your next steps
