HTML Tag Reference - HTML tag <span>

This <span> element is used to apply style sheet to the text.

Browser compatibility

<span> Yes Yes Yes Yes Yes

What's new in HTML5


Global Attributes

The <span> tag supports the Global Attributes in HTML.

Event Attributes

The <span> tag supports the Event Attributes in HTML.

Default CSS Settings



A demo showing how to use <span> tag.

          <span style="color: #FF0000;">paragraph</span>
          <span style="color: blue;">three </span> 
          <span style="color: blue;">styles </span>.

Click to view the demo