345/361

What's the difference between "resetting" and "normalizing" CSS? Which would you choose, and why?

Quiz · CSS
Medium
3 min
css
  • Resetting - Resetting is meant to strip all default browser styling on elements. For e.g. margins, paddings, font-sizes of all elements are reset to be the same. You will have to redeclare styling for common typographic elements.
  • Normalizing - Normalizing preserves useful default styles rather than "unstyling" everything. It also corrects bugs for common browser dependencies.

I would choose resetting when I have a very customized or unconventional site design such that I need to do a lot of my own styling and do not need any default styling to be preserved.

Adapted from the Front End Interview Handbook by Yangshun Tay and contributors (MIT License). Source

Spotted a mistake or a rights concern? Report an issue