Div and span tags
Simple, yet complex
code in HTML. This becomes very usefull when you want to manipulate several lines of code as once. For example, if you want to change the background of several blocks of text that are next to each other, rather than changing the color of each
block individually, you could simply wrap the text with a div or span tag and change the color of the div.
The difference between div and span
The div and span tags, while having similar purposes, have slight differences. The main difference between the two tags is that the div tag defines a block of code, which means that any code contained within a div will be portioned off in a
separate block region, while the span tags can wrap code that is inline with other elements.
Using div and span tags