HTML <span> tag
Example
A text with a span element that can be styled with CSS:
<p>My mother has <span
class="blue">light blue</span>
eyes.</p>
|
Try it yourself!
|
Definition and Usage
The <span> tag provides no visual change by itself.
The <span> tag provides a way to add a hook to a part of a text or a part of
a document.
When the text is hooked in a span element you can add styles to the content,
or manipulate the content with for example JavaScript.
Browser Support

The <span> tag is supported in all major browsers.
Differences Between HTML and XHTML
NONE
Standard Attributes
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard
Attributes.
Event Attributes
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|