Premium Features

Download Video

Removing Default Browser Styles

Published 3 months 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.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Cheat Sheet Preview

Download The Official Chris Courses HTML5 Canvas Cheat Sheet

Essential canvas syntax at your fingertips.

Download Now

Providing the lift to launch your development career

© 2021 Chris Courses. All rights reserved.