View Single Post
  #2 (permalink)  
Old October 7th, 2005, 07:13 AM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I can't think of any differences. You have to reference the <html> tag on occaision though. For instance, if you want to set the height of the <body> element to 100% of the viewport, the <html> tag must also be set to 100%. That has to do with the shrink-to-fit height sizing algorithm specified in the CSS standards.

The :root psuedo-class isn't very useful in HTML because you *can* reference the <html> tag directly. Where it becomes useful, and the reason for it existing as far as I can tell, is in XML where the root element can be variable, and not always the same tag.

Hope that answers your question.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design