Image Unavailable
Click to view in closer detail!

Description »

This is the tag that contains everything, including the <head> and <body>. It only does not contain <!DOCTYPE>.

Details »

The <html> tag is the master element of everything on the page. Nothing contains <html>, and <html> contains everything. The html type selector defines the design aspects of this tag.

Typically, it is better to use the body selector instead of html. Using body effectively has the same effect anyway, and the <html> tag should be confined to defining the page itself.

Examples »

One trick that might be employed using this tag is always ensuring that a page has a scroll bar. Depending on the size of a page's content, pages might be shorter than the height of the screen, so the scroll bar is automatically eliminated. Having the scroll bar present at all times ensures that the width of the page will be consistent through every page, including the short ones.

The code below does the trick:

html{    min-height: 101%; }

Try It on the CSS Zone Sandbox!

Base CSS »

* html hr {
    margin: 2px 2em;

Not defined in Base CSS.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License