HTML - Span element

About

The span element is a generic wrapper for phrasing content that by itself does not represent anything.

Span doesn't have explicit attributes.

Usage

Span is then handy to use:

Rendering

div elements are rendered as block boxes whereas span element are rendered as inline box.

Example:

  • The world word will then stay on the same line (ie in the p block element.
<p>
Hallo <span style="color:green">World</span>
</p>
  • Output:

Documentation / Reference


Powered by ComboStrap