span element | span object
[This documentation is preliminary and is subject to change.]
Specifies an inline text container.
![]() ![]() |
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
- HTML 4.01 Specification, Section 7.5.4
HTML information
| Closing Tag | required |
|---|---|
| CSS Display | inline |
DOM Information
Inheritance Hierarchy
Node
span
Element
span
Remarks
The SPAN element is especially useful for applying cascading style sheets (CSS) styles.
Examples
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.
Build date: 3/8/2012

