How span and div tags are different?
When i draw a circle using <div> it's all ok and when i draw a circle using <span> it's not circle but a rectangle .....why ?
Mr. Unknown Div is block element and span is inline element. Block level element can have their own height and width, it is 'not dependent' on the content in that div tag. On the other hand inline elements don't have their own height and width, their height and width is 'dependent' on the content in that span tag. Though you have given height and width to span tag in css but see that it is not working. Also you can change the words between both div and span tag to look at change in height and width. There you will see that changing content in div will not affect on it but changing content in span will definitely affect its height and width. Hope you will understand.
https://code.sololearn.com/WXninGIk2u7u/?ref=app Here is the code .please check ....