<span>

The span element is a generic inline container for phrasing content with no inherent semantics.

Since HTML 4.0 Spec ↗

Syntax

<span>...</span>

Examples

<p>The total is <span class="price">$19.99</span> today.</p>
Output
Renders the price inline within the sentence, stylable independently without breaking the line.

Notes

Use <span> for styling or scripting a slice of inline text when no semantic inline element (em, strong, code, time) applies.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also