The div and span elements

The HTML div element is the generic container for flow content. It's used to group content so it can be easily styled using the class or id attributes, marking a section of a document as being written in a different language (using the lang attribute), and so on.

The HTML span element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes). pan is very much like a div element, but div is a block-level element whereas a span is an inline element.