Grouping of Elements (Span and Div)

The elements <span> and <div> are used to group and structure a document and will often be used together with the attributes class and id.

Grouping with <span>

The element <span> is what you could call a neutral element which does not add anything to the document itself. But with CSS, <span> can be used to add visual features to specific parts of text in your documents.

Grouping with <div>

Whereas <span> is used within a block-level element, <div> is used to group one or more block level elements.