HTML <span> element


<span> tag is a generic container or place holder if there is no content. It is similiar to <div> tag.

Using <span> to markup a block of text with styles:

<span style="background-color:red;color:white;font-size:17px">
AIDS is a sexually transmitted disease.
</span>

AIDS is a sexually transmitted disease.
Using <span> as a place holder, and change its content by javascript when needed:
<span id=p>
Place Holder
</span>
<br>
<a href="javascript: document.getElementById('ph').innerHTML='
The content has changed to show how a place holder works!';">
Change content in the place holder</a>

Place Holder
Change content in the place holder