Span Tag is an HTML Tag used to group Inline Elements. An Inline Element is an element which occupies only the space between the Opening and Closing Tag. A Span Tag by itself is an Inline Element. For Example
In the diagram above, the HTML code is on the First box from the top left corner, followed by CSS, Result and Java Script in the clockwise direction.
In the Sentence “The Grass is Green”, the span tag is applied to the word Green. And you would notice that the color is only applied to the word Green.
Span Tags take minimal amount of space. With this analogy, if you want to group two Inline elements horizontally always use a Span Tag to group them.