Div is short for division (or section), so it can be used to structure your page. Div is a large block-level element. You can put just about anything in a div, but you don't need to use it unless you want to manipulate your content, such as aligning or applying a class to some text.
Div can be used to separate sections of a page. You can put paragraphs in a div but you may not put a div in a paragraph. Div gains a lot of power with CSS and is essential for DHTML, so we'll talk about it more later.
<div align="center">
<img src="images/gnubee_mug.jpg" width="180" height="194" />
</div>
looks like:
The center tag ( <center>...</center> ) was deprecated in HTML 4.01 and is not defined in XHTML Strict, so use the div tag instead from now on.
<div align="right" style="color:red">
<p>This paragraph is red<br />and aligned to the right.</p>
</div>
looks like:
This paragraph is red
and aligned to the right.
Happy coding!
Gnubee