<span>

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

The SPAN element defines a section in a document.

You can also use it as a style container.


<span>inline section</span>

The two types of section

DIV element (Block-level element) : Defines a block-level section.
SPAN element (Inline element) : Defines a inline section.

Example


<div style="padding: 10px; border: 1px #ff8000 solid; background-color: #ffffff;">

<p>Difference between <span style="color: red;">DIV</span> and <span style="color: red;">SPAN</span>.</p>

</div>

Output

Difference between DIV and SPAN.