Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>The &lt;div&gt; Tag</title>
</head>
<body>
<h1> The &lt;div&gt; Tag </h1>
<div style="background-color:#8ebf42">
<p>We use the &lt;div&gt; tag to group two paragraphs for applying a background to the text, and to add color to this
<span style="color:#1c87c9">word</span> we place it within &lt;span&gt; tag.</p>
<p> Pay attention, that the &lt;div&gt; tag is a block-level element, so a line break is placed before and after
it.</p>
</div>
</body>
</html>