0

How are inline and block elements different from each other?

17th Sep 2016, 6:01 AM
Chirag Sabhadiya
Chirag Sabhadiya - avatar
1 Answer
0
A block element is an element that takes up the full width available, and has a line break before and after it. <h1>, <p>, <li>, and <div> are all examples of block elements. An inline element only takes up as much width as necessary, cannot accept width and height values, and does not force line breaks. <a> and <span> are examples of inline elements.
17th Sep 2016, 6:01 AM
Chirag Sabhadiya
Chirag Sabhadiya - avatar