Why should I use a container div in HTML?

Posted by lara.robertson on Stack Overflow See other posts from Stack Overflow or by lara.robertson
Published on 2008-12-10T00:34:27Z Indexed on 2010/06/17 21:33 UTC
Read the original article Hit count: 263

Filed under:
|
|

I am currently learning html/css, and have noticed a common technique is to place a generic container div in the root of the body tag:

<html>
  <head>
    ...
  </head>
  <body>
    <div id="container">
      ...
    </div>
  </body>
</html>

Is there a valid reason for doing this? Why can't the css just reference the body tag?

© Stack Overflow or respective owner

Related posts about html

Related posts about css