Groups inline elements in a document. The span element is both style and semantics neutral; it does not assign any style attributes or semantic meaning on its own.
This example uses the span element to create an inline text container that changes the color of a word to blue.
<p>This paragraph contains a single <span style="color: blue">blue</span> word.
This example uses the span element to add a simple Microformats2 h-card to a person’s name.
<span class="h-card vcard">Pius Uzamere</span>
The SPAN element is especially useful for applying cascading style sheets (CSS) styles.
The span element was not initially part of HTML.
On July 3, 1995, Benjamin C. W. Sittler proposes a generic text container tag <text> for applying styles to certain blocks of text. The rendering is neutral except if used in conjunction of a stylesheet. There is a debate around <c> versus <text> about readability, meaning. Bert Bos is mentioning the extensibility nature of the <text> element through the class attribute (with values such as city, person, date, etc.). Paul Prescod is worried that both elements will be abused. He is opposed to text mentionning that “any new element should be on an old one” and adding “If we create a tag with no semantics it can be used anywehere without ever being wrong. We must force authors to properly tag the semantics of their document. We must force editor vendors to make that choice explicit in their interfaces.”
<span> has been introduced to html through the internationalization WG on September 25, 1995 in the second draft html-i18n. The purpose was to create a generic container needed to carry the lang and bidi attributes in cases where no other element is appropriate.
The first draft of html-style had the <c> element in its table of content with the purpose of applying a style to some text which doesn’t have a structural role. Michael J Hannah on December 5, 1995 proposes to get rid of the new HTML element <c> to use the new element part of the internationalization proposal draft-ietf-html-i18n because it will be able to carry the style attribute. Then in the 23 January 1996 version of the html-style it has been replaced by the <span> element.
Microsoft Developer Network: [Windows Internet Explorer API reference Article]