I have seen this explained as a way of giving complete control to the css author. Browsers handle the “default” display of elements similar but differently. One of the more popular examples is the <ul>
element. Try this:
<ul style="padding:0;">
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
</ul>
In Firefox, the list will display with no white space on the left side, but in IE6 the list will display “normally”.
The absolute reverse is true with the following code:
<ul style="margin:0;">
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
</ul>
Firefox displays normal while IE6 shows no white space on the left.
While learning css, I can remember reading a few sites that actually suggested using the
*{
padding: 0px;
margin: 0px;
}
code at the top of the style sheet to reset the margin and padding of all elements to “0”. This will allow the author to start from scratch defining the values they wanted for all elements.
I find this to be a very bad practice as it can really bloat the code. I would suggest that this practice not be used, but that is my opinion.
w3c defines the * selector as the “Universal selector” and states that it will match any element.
The SelectORade definition is also true because all elements are descendants of <html>
.