Remove default margin/padding on elements;

hi, is there a proper way to turn off default margin and padding on html elements; I set both to 0 in the body tag but notice some children h1,p,ul tags still apply theirs. I don't want to override it each time for each scenario. is there a better way?
No description
No description
5 Replies
Mannix
Mannix•4mo ago
you can always nuke them with universal * selector *{margin:0;}
yuki_toki
yuki_toki•4mo ago
thankssss is that generally a good or bad idea?
Mannix
Mannix•4mo ago
if you really don't want to deal with removing default margin from elements it's the only option some people use it some don't it's up to a preference 🙂
13eck
13eck•4mo ago
If you do nuke all margin like that you'll have to go in and add margin back into the elements you removed it from. You have to ask yourself which will be easier for you: removing margin from the elements you don't want it on or adding it to the elements you do want it on. It's a trade-off
13eck
13eck•4mo ago
Just don't do the same to padding and wonder why your list items are broken :p