Question:

what is difference between span and div?

by Israr Ahmad  |  2 years, 12 month(s) ago

0 LIKES UnLike

what is difference between span and div?

 Tags: difference, div, Span

   Report

2 ANSWERS

  1. Guest20232516
    span is inline. div is block.

  2. adeel hussain
    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.
Israr Ahmad QUESTIONS

Question Stats

Latest activity: 1 year, 6 month(s) ago.
This question has been viewed 339 times and has 2 answers.

1 User is following this question

Israr Ahmad

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions