Share:
       
   

In this article today we are talking difference between “Div” and “Span”

<div> Div is block element are take the full available width of block level. Div tags are used to define section in document block wise element.

Note: Block level elements are <div>, <p>, <img>, <section> and many more.

Example of block level element see below:

<div> full available width of block level </div>

<span> Span Inline elements are only take the width that is required to fit into the box.

span is very similar to the HTML “div” tag, but div is a block-level tag and span is an inline tag. Span element is a generic online container for online elements and content.

Span Inline elements are only take the width that is required to fit into the box.

Example of inline element see below:

<span> required to fit width into the box. </span>

difference between “div” and “span” elements

difference between "div" and "span" elements
difference between div and span
top html interview question

Top HTML / HTML5 Interview Questions

click on button to view and read HTML Interview Questions

About Raka Rocks

Hi, My self Raka Rocks. I am web designer and Front End Developer total 8 year exp. in this fields. I am a continuous blogger and has blogged on different topics. He loves to surf the Internet and always tries to get new ideas about new technologies and innovations and share this excellent information with all technology lovers.

Leave a Reply

Your email address will not be published. Required fields are marked *