Difference between div and span tag
The basic difference between them is ,div is
block level element and span is inline level element.
and <div> tags both allow a Web designer to style text and add
other formatting attributes to their Web page. They are not
interchangeable tags, though. <div> tags are block-level elements,
whereas <span> tags are not.
<div> tags are block elements that allow you to
position elements contained within them
<p>This is a paragraph.</p>
<span> tags are NOT block elements
Blog is manage By<span class="blue">Aamir Hasan</span>
Revision number 1, Sunday, March 21, 2010 6:53:23 PM by Aamir Hasan
This is not the most up to date version of this article. The most recent version can be found here.
You must Login to comment.
Tue, Mar 23, 2010 3:00 AM
Another difference I see would be that you can use span> in a div> but not vice versa, strictly speaking.
Wed, Mar 24, 2010 11:02 AM
Better explain when to use Div and when use span!