The <span> tag

<span> is the inline version of div: a container with no semantic meaning, for styling or scripting part of some text.

Syntax

<span>...</span>

Example

<p>This text is <span style="color:red">partly red</span>.</p>

Notes

  • If the text carries semantic meaning (importance, emphasis, code), prefer strong, em, or code instead of span.

Related tools