Concepts 🚀 Project 🧮 Labs
🧮 Labs / CSS / CSS Reset — start every project with this

CSS Reset — start every project with this

Remove default browser margins, set box-sizing: border-box on everything. The FIRST 4 lines of every CSS file.

style.css v3.1
style.css — the CSS rules
index.html — the HTML structure (what the CSS targets)
Live preview updates as you type
🧠 How it works

* { margin: 0; padding: 0; box-sizing: border-box; } is the most important line in CSS. It removes ALL default browser margins/paddings (which differ between Chrome, Firefox, Safari) and sets box-sizing: border-box so padding doesn't add to the element's width. Without border-box: a 200px box with 20px padding is actually 240px wide — breaks layouts. With border-box: 200px stays 200px, padding eats into the content area. Set a base font-family + size on body — everything inherits it. Remove list bullets (list-style: none) — you'll add them back selectively where needed.

✏️ Try these changes
  • Comment out the * { } block (wrap it in /* */)
    → all the default margins come back — h1 gets a big top margin, ul gets bullets
  • Change font-size: 16px to 14px
    → all text shrinks (inherited from body)
  • Change color: #1a1a1a to #666
    → all text becomes grey (inherited)
  • Add list-style: disc; to the ul, ol rule
    → bullets come back