Easy Tutorial
❮ Att Img Alt Att Global Class ❯

HTML <span> Tag

Example

Using the <span> element to color a part of the text:


Browser Support

All major browsers support the <span> tag.


Tag Definition and Usage

The <span> tag is used to group inline-elements in a document.

The <span> tag provides no visual change by itself. When you apply styles to it, it can create visual changes. If no styles are applied to the <span>, the text within the <span> element will look the same as any other text.

The <span> tag provides a way to isolate a part of text or a part of a document.


Tips and Notes

Tip: Text enclosed by the <span> element can be styled using CSS, or manipulated using JavaScript.


Differences Between HTML 4.01 and HTML5

NONE.


Global Attributes

The <span> tag supports HTML's global attributes.


Event Attributes

The <span> tag supports HTML's event attributes.

❮ Att Img Alt Att Global Class ❯