View Full Version : Difference between span and div
sathishhc
07-25-2006, 09:55 AM
Hi,
Can any one tell me what is difference between span and div
Span is an inline element, div is a block-level element.
jscheuer1
07-26-2006, 05:15 AM
Inline (as with span, a, img, b, i) means that the width is content driven and that there is no implied box or line-break involved. With a block level element (div, p, h1, h2), width is generally assumed to be 100% unless specified and there is an implied box around it as well as an assumed line break before and after. These definitions may not be strictly correct in a technical sense and there are cases where things can get muddied but, they give a general layman's idea of the situation.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.