Question:

what is difference between span and div?

by Guest3574  |  12 years, 9 month(s) ago

0 LIKES UnLike

what is difference between span and div?

 Tags: difference, div, Span

   Report

2 ANSWERS

  1. Jessica_Nancy
    span is inline. div is block.
    All the elements in the document hierarchy are either classified (mainly) as inline or block. Block elements include paragraphs, headers, forms, divs. Inline elements include bold tags, em, span etc... By default, an inline element will remain within it the current flow of its parent element. Its parent element can be either an inline or block element. An inline element however cannot hold a block element. So you can't put a div or a paragraph in a span or an em element. Block elements are taken out of the flow of the current text.
    Another thing thing that you should realize is that inline and block elements don't accept the same properties. For instance, block elements can accept most properties, but inline elements can't have a width or a height applied to them.

  2. Guest9507
    span is inline. div is block.
Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 13 years, 8 month(s) ago.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.