<html>
<head>
</head>
<body>
<p>some text</p>
</body>
</html>
Most HTML tags come in two pieces: an "open" piece (ex. <p>) and a "close" piece (ex. </p>). These two pieces function like containers. Anything in between the "open" and "close" parts of the tag is considered to be inside the tag.
<html>
<head>
</head>
<body>
<p>some text</p>
</body>
</html>
As a result, HTML documents (also known as web pages) are structured a lot like Russian dolls. Tags generally are nested within other tags. In the code above, for example, some text is inside the p tag, which is inside the body tag, which is inside the html tag.