Possible Duplicate:
Is it OK to style the <html> tag?
Is correct to set CSS property to html tag?
Is it valid or ok to apply styles directly to the <html> tag?
Example:
<html class="myclass">
Example 2:
<html style="background-color: #000000;">
I think the answer is no, but I would like a solid confirmation from the community.
Yes, it’s both valid and okay to apply styles to the
<html>element. I often use it to apply full-page background gradients:Or make an element take up the entire available height:
When applied to only the
<body>element, this kind of thing doesn’t work. And, of course, don’t use inline styles.