Good webdevelopers know, when you want to build a website the best way is to use HTML to build your site only, without style properties. All the styling has to be done by the CSS file.
As the most of you already know there standard values in browsers for specific html tags. Like the <strong></strong> means "extra emphasis" but Internet Explorer makes it bold!... also padding and margins sometimes have standard values....
I always started my CSS with his::
Code:
*{
padding:0;
margin:0;
}
And it really helps me to get rid of major problems! But a friend told me of a disadvantage using the *. By using this it will first add the padding and margins on ALL your objects! This can slow down your website a LOT.
A better method would be:
Code:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}
q:before,q:after {
content:'';
}
abbr,acronym { border:0;
}
This will also exclude every defined style from your HTML page. So in my opinion this is extremly usefull when you start making a website, cause all the style have to be programmed in the css now and thats the way it should be done!
Source:
http://developer.yahoo.com/yui/reset/