HTML <div> element


<div> tag can be used as a general container or a place holder when there is no content.

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

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

AIDS is a sexually transmitted disease.

Using <div> as a place holder, and change its content by javascript when needed:
<div id=p>
Place Holder
</div>
<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