Coding Ninjas Logo

Home > HTML Questions >What is the difference between span and div?

What is the difference between span and div?



Answer:

The difference is that span gives the output with display: inline and div gives the output with display: block. span is used when we need our elements to be shown in a line, one after the other.


Similar Questions