The <span> HTML 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), or because they share attribute values, such as lang .
What is span used for in HTML?
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute.
What is span example?
Span is the amount of area or the amount of time that something encompasses. An example of span is how long you live. An example of span is a house on three acres. Something, such as a railroad trestle or bridge, that extends from one point to another.