Sunday 23 June 2013

DIV TAG in HTML

Div means division.
It is used to create a section on a webpage.

This is a div with border

This is a div with Text-Color white, height 50px; width 300px and background light Gray

Lets create a basic BOX-MODEL of a webpage using div:

<div style="width:600px; height:600px; border:1px solid">
      <div style="width:600px; height:200px; background:orange">
               <img src="logo.png" style="float:left">
               <h1>This is the HEADER SECTION</h1>

      </div>
      <div style="width:600px; height:200px; background:white">
               <h1>This is the CONTAINER SECTION</h1>

       </div>
      <div style="width:600px; height:200px; background:green">
               <h1>This is the FOOTER SECTION</h1>
     </div>    

</div>

this is how it will looks in your browser window:-

;

This is the HEADER SECTION

This is the CONTAINER SECTION

This is the FOOTER SECTION



No comments: