Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Review: Creating HTML Content

Anurupa Bose
PLUS
Anurupa Bose
Courses Plus Student 1,554 Points

What is the function of a CSS reset like normalize.css?

what does normalize.css mean and whereis it used

Well basically every browser has its own default setting for things like padding and margins. Normalize and other resets just change all those setting so you are working on a blank canvas, that is the same blank canvas on every browser.

3 Answers

Tomas Pavlik
Tomas Pavlik
26,726 Points

Hi, using normalize is recommended because all browsers have their own set of rules and your website may look different in some details. You can use normalize.css from the web or make your own - my basic is something like:

  • { padding: 0; margin: 0; }
Anurupa Bose
Anurupa Bose
Courses Plus Student 1,554 Points

that means normalize.css will have only margin and padding as 0. Nothing else is required . Thanks for the answer.

Tomas Pavlik
Tomas Pavlik
26,726 Points

Hi, it is not that simple, normalize resets tens of rules. I just sometimes use the simplest reset which is padding and margin set to 0, but that's not enough for many projects :-)

Making your own is worth it to learn, but lets be real, when you develop sites and applications its only natural to take as many short cuts as possible, that is why we have, bootstrap, foundation, normalize, jquery etc etc.