Div means division.
It is used to create a section on a webpage.
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:-
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:-
No comments:
Post a Comment