span

< html‎ | elements
Jump to: navigation, search

span

This article is In Progress.


W3C Recommendation

Summary

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.


Overview Table

DOM Interface HTMLSpanElement

HTML information

Closing Tag required
CSS Display inline


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
?
Yes
?
Yes
?
Yes
?
Yes
?
Yes

Mobile

FeaturesAndroidFirefox MobileIE PhoneOpera MobileSafari Mobile
Basic support
?
Yes
?
Yes
?
Yes
?
Yes
?
Yes

Examples

This example uses the span element to create an inline text container that changes the color of a word to blue.

HTML

<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.

HTML

<span class="h-card vcard">Pius Uzamere</span>

Notes

Remarks

The SPAN element is especially useful for applying cascading style sheets (CSS) styles.

Standards information

Members

The span object has these types of members:

  • [#events Events]
  • [#methods Methods]
  • [#properties Properties]


Events

The span object has these events. {


See also

Related articles

HTML


















































… further results

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]