Premium Features

Download Video

Removing Default Browser Styles

Published 2 years ago

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.


Want to participate?

Create a free Chris Courses account to begin


No comments yet, be the first to add one

Providing the lift to launch your development career

© 2023 Chris Courses. All rights reserved.