Skip to main content
🌐 HTML Basics

Tags Inside Tags πŸ“¦

You just saw <li> tags living inside a <ul>. The next lesson builds a whole page, and a page is really just tags inside tags β€” so let's get cozy with that idea first. 😊

When one tag sits inside another, we say it's nested. The outer tag is like a box, and the inner tags are what's in the box:

<body>
  <h1>Home</h1>
</body>

Here the <h1> is inside the <body>. A full web page nests a few of these boxes:

<html>
  <head>
    <title>My Page</title>
  </head>
  <body>
    <h1>Hi!</h1>
  </body>
</html>
  • <head> holds info about the page (like the <title> shown in the browser tab).
  • <body> holds what people actually see.

Read it slowly, then answer below. You'll build exactly this next. πŸ‘‡

In <body><h1>Home</h1></body>, the <h1> is…

Which part shows up in the browser tab?

The <body> is for…