Asked in Computer TerminologyWeb Design and PublishingCSS Cascading Style Sheets
What is the difference between the Div and Span tag?
May 19, 2016 11:52AM
A div is a block element. This means that if you use a div, unless you float objects next to it using CSS, the div will be alone on a line. A span is an inline element. This means that unless you use line breaks next to it or change it to a block element using CSS, the span will be on the same line as whatever is next or before to it in the code.
This is a
text is above and below but not beside
This is a <span>element</span>, text is before and after on the same line.