Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove browser default styling <!DOCTYPE>

Tags:

html

css

doctype

Is there a way or <!DOCTYPE> declaration such as XHTML or HTML4 that would remove the default CSS styling on elements?

like image 596
Jordan Davis Avatar asked Oct 16 '25 10:10

Jordan Davis


2 Answers

Doctype is not used for styling. There are two prominent ways of removing all the styles and uniforming the default look.

  1. normalize.css https://necolas.github.io/normalize.css/
  2. reset.css http://meyerweb.com/eric/tools/css/reset/

add these styles to your css before your stylesheet to uniform you layout to a certain degree, across different browsers. What is the difference between Normalize.css and Reset CSS?

like image 179
Yasin Yaqoobi Avatar answered Oct 17 '25 23:10

Yasin Yaqoobi


I personally have been using the code below for all of my projects till date.

*{
    margin:0;
    padding:0;
    box-sizing: border-box;
}

Also here an article if you are looking for a complete reset of some kind http://meyerweb.com/eric/tools/css/reset/

like image 26
Pratik Thorat Avatar answered Oct 18 '25 01:10

Pratik Thorat