Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does DIV do ?? 2

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
Hi. Can anyone explain to me what the <DIV> tag does? Is it anything like <SPAN> ? Thanks
 
A div is a container that you position somewhere. A span is a container that contains style information like color, font and background-color information.

A div can have style information that a span has but spans are more appropriate inside a paragraph of text.

Here is an example :

<div style=&quot;position:absolute;left:100px;top:10px;&quot;>
This is a <span style=&quot;font-weight:bold;&quot;>paragraph</span> where different styles and <span style=&quot;color:Red;background-color:Teal;&quot;>colors</span> are given using span. The div is the container that positions this <span style=&quot;font-weight:bold;&quot;>paragraph</span>.
</div>

Gary Haran
********************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top