Division elements
In the example we discussed earlier, we observed that almost all of the elements in the body element were children of the body element.

<html>
<head>
<title>Small example</title>
</head>
<body>
<h1>Practice in using HTML elements</h1>
<h2>Elements for the head</h2>
<p>The title element is used in the head element.</p>
<h2>Elements for the body</h2>
<p>The body may contain headings, paragraphs, and links.</p>
<p>For more information, click on this <a>link.</a></p>
</body>
</html>
In particular, none of the headings were grouped with paragraphs, nor were related paragraphs grouped together. Although later we will learn refined ways of categorizing and structuring information, for now the division element is a good basic tool for grouping elements together. Here is one way of grouping the elments using division elements:
<html>
<head>
<title>Small example</title>
</head>
<body>
<h1>Practice in using HTML elements</h1>
<div>
<h2>Elements for the head</h2>
<p>The title element is used in the head element.</p>
</div>
<div>
<h2>Elements for the body</h2>
<p>The body may contain headings, paragraphs, and links.</p>
<p>For more information, click on this <a>link.</a></p>
</div>
</body>
</html>