Browsers apply their own default styles to HTML elements, such as margins on <body> or font sizes on <h1>. The purpose of a CSS reset is to neutralize these differences and provide a uniform starting point for developers.
Different browsers use different default styles. This can cause problems if we want a consistent appearance. A reset stylesheet helps remove these differences.
The following example shows how to set all elements’ margin and padding to zero and box-sizing to border-box.
A reset not only removes margins and padding but can also clear other default settings, such as list and link styles.
After applying a reset file, we can more easily build custom styles. Here are some suggestions for using it:
✨ Ask Lara — your AI study partner
Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions — available from the Go plan and above.
Lara helps you learn faster — exclusive to ReadyTools Go, Plus, and Max members.