The main difference between DIV and SPAN is, SPAN does not do formatting by itself whereas DIV does that.
DIV tags are block elements that allow us to position elements
SPAN tags are inline elements
DIV tags creates some space around itself. It create line breaks. That is it act like a <P> tag
SPAN tags doesn’t create any unwanted space around it. It takes the actual space of the element.
The below example explains the actual difference between the DIV and SPAN tag:
1(a).<DIV style=”display:inline”>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</DIV>
1(b). <SPAN>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</SPAN>
2(a).<DIV>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</DIV>
2(b).<SPAN style=”display:block”>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</SPAN>
The state 1(a) & 1(b) will provide the same output and state 2(a) & 2(b) will provide the same output .
Cheers,
Kumz