By default, browsers such as Chrome, Firefox, Edge, and Safari will provide a couple of default styles to your website's HTML elements. Some of these are unwanted, including, the <body></body>
tag's default margin of 8px.
To get rid of these, all we have to do is target the element directly with CSS, then apply a new default that should take its place:
body {
margin: 0;
}
CSS frameworks typically provide some sort of CSS reset that resets all browser defaults to blank values of 0
. This allows the framework to have full control over how different elements will look without the browser getting in the way.
You'll get to utilize a framework with a browser reset in later episodes.