css div tags help

I looked on google for what is DIV tags and how to use div tags.

They say it is used to divid sections of the page and for posisoning elementes.

I just got more and more mixed up.

Say I want a Headline it goes <H1> text here </H1>

What would I use a div tag for?????

If I want to center it I do this
<center><H1> text here </H></center>

What would I use a div tag for????????????????
 
Each opening <div class="???"> would refer to a named sub-section of your style sheet (header, footer, menu, etc...) and each </div> would close that part of the style.

Your style sheet would have lots of sections or subs named appropriately.

edit: more detail

Each section of the style sheet would include how you wanted text to look on that section of each page. The idea is you have a bunch of text and other formatting options input in one stylesheet that can be referred to from all the pages on your site.
 
thanks but

Like I have this

<A HREF="spring.html">
<img src="print A2.jpg" WIDTH="185" alt="" border="0" align="">
<p style="background:black;width:220px;color:white;font-family:Times New Roman, Arial;font-size:20px">
Spring Gallery.
</A>
</p>

I have an image and text as a link.
But my text is in a black box and all is good.

But the text gets put underneeth the photo.

It wont stay right next to the image why????????

and can I use the DiV tags to get the text to stay right next to the Photo but still be in the black box??
 
Back
Top