HTML Tutorial in Hindi [Part 21] - Difference between div and span
In this tutorial i will talk about difference between div and span. The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line (such as inside a paragraph) whereas a div (division) element is block-line (which is basically equivalent to having a line-break before and after it) and used to group larger chunks of code. It used to group elements for styling purposes (by using the class or id attributes). A better way to use it when no other semantic element is available.