Challenge 1, non-solution question margin

Hey! Just did the CRL Challenge 1, and I think I fixed the main challenges. But what I don't understand is why the h1 and p is getting a margin of 21px and 16px. Is this default for these elements? And, is this why we always start a .css with?
*, *::before, *::after {
margin: 0; padding: 0;
}
*, *::before, *::after {
margin: 0; padding: 0;
}
https://codepen.io/amarlong/pen/abKKrqe
2 Replies
Wolle
Wolle3y ago
The default sizes and margin on elements comes from the browser and is called "user agent style sheet". This is the reason most project use a CSS reset, like you posted.
Å Marlon G
Å Marlon GOP3y ago
Thank you! Thought that woukd be it, but nice to have it confirmed. Have a nice day! thumbup
Want results from more Discord servers?
Add your server