Elements panel
Shows the HTML node you selected on the page.
DevTools turns CSS from guessing into evidence. Inspect elements, edit rules live, see overridden declarations and understand the box model in the browser.
Inspect element Toggle declaration Read computed style Copy fix back to CSS
CSS Basics
Every modern browser includes developer tools. For CSS, the most important workflow is inspecting an element and reading which rules apply to it.
The Styles panel shows matching CSS rules. The Computed panel shows the final value after cascade, inheritance and browser defaults. The box model view explains content, padding, border and margin.
Good CSS developers do not guess for long. They inspect, toggle declarations, edit values live and then move the proven change back into the stylesheet.
Shows the HTML node you selected on the page.
Shows matching CSS rules and crossed-out declarations.
Shows the final values the browser actually uses.
Tests responsive layouts at different viewport sizes.
Visual model
CSS becomes easier when you can see the parts: what is selected, what is declared, what the browser loads and what the final interface receives.
<article class="card"> <h1>CSS Debugging</h1> <p>Inspect the applied styles.</p> </article>
.card {
padding: 24px;
border-radius: 18px;
}
h1 {
margin: 0 0 12px;
}
Examples
1. Inspect the element. 2. Check which selector applies. 3. Toggle suspicious declarations. 4. Read the computed value. 5. Test at mobile width. 6. Copy the smallest working fix into CSS.
1. Add more !important. 2. Refresh randomly. 3. Change unrelated CSS. 4. Hope the layout moves. 5. Forget to test mobile.
Rules that matter
Beginners often try to learn CSS by collecting declarations. That is backwards. Learn the decisions first, then the properties become much easier to remember.
Do not debug from memory. Select the node that actually has the problem.
A crossed-out declaration lost to another rule, invalid syntax or unsupported value.
Styles shows candidates. Computed shows the final result.
DevTools changes are temporary until you place them in your source files.
Spacing problems become clearer when you see content, padding, border and margin separately.
Device toolbar catches layout issues before users do.
Production thinking
CSS has many moving parts. DevTools shows what the browser actually did, which makes debugging faster and makes you a better designer of systems.
DevTools can inspect focus states, contrast, accessibility names and reduced-motion behavior. Use it to verify people can actually use the interface.
Before shipping, inspect important components at multiple widths and states. A page that only works in your default viewport is not finished.
DevTools performance and rendering tools help find slow assets, layout shifts and blocked resources that can affect user experience.
Live code lab
The preview runs in an isolated iframe. Links and forms stay inside the practice area, so you can experiment without leaving the lesson.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read the lesson. Answer these questions out loud or write the answers in your own notes. CSS becomes real when you can explain what the browser is doing.
Senior audit upgrade
The senior habit is not guessing. Reproduce the problem, inspect the element, read computed styles, disable declarations and only then change the source CSS.
Start from the exact viewport, state and content that breaks.
The computed panel shows the final value after cascade, inheritance and layout decisions.
Turn declarations off one by one to find the actual cause instead of adding another override.
Chapter project
Use selectors, declarations and external CSS to turn semantic HTML into a polished learning card.
a reusable card with typography, spacing, color and a clear call to action
Can another student change the card colors without touching the HTML?