| Main difference between span and div tag in HTML?
Below are the main difference between span and div tag in HTML
(1)div tag is a block element
(2)span tag is a inline element
Now come to some other point in both of this it is illegal to place block element in an inline element. To understand this we will take an example of p tag. We can place p tag in the div tag and p tag can also have the span tag. ANd it is almost imposible for span tag to have div and p tag inside.
So it is quite clear the content of block and inline element. Block element have the inline element but a inline element donot have the block element. | | |