Applying styles to html will work just like with any other element and its children: styles leak from above if the child does not have his own definition.
With * you set the style for each element separately, so it is applied to each element of the first level, element of the second level, etc.
An example of a practical difference is the use of the > operator, which applies styles to the direct children of an element:
* > p { font-size: 12px; }
Sets the font size for each p , which is directly a child of any element in the DOM, regardless of depth.
html > p { font-size: 12px; }
The font size will be set for each p , which will be directly a child of the html, which will not happen, since body and head are usually the only children of html
source share