Skip to main content
🌐 HTML Basics

What Is a Tag? 🏷️

Welcome! πŸ‘‹ You're about to build real web pages. We'll go one tiny step at a time, and you can't break anything.

HTML is just your words, wrapped in little labels called tags. A tag tells the browser what a piece of text is β€” a heading, a paragraph, a link.

Here is a paragraph tag wrapping the word Hi:

<p>Hi</p>

See the two parts?

  • <p> is the opening tag β€” it says "a paragraph starts here."
  • </p> is the closing tag β€” the slash / means "the paragraph ends here."
  • Hi in the middle is your content.

Almost every tag comes as a matching pair: one to open, one to close. Let's check you've spotted the pattern. πŸ‘‡

In <p>Hi</p>, which part is the opening tag?

What makes </p> a closing tag?

In <h1>Welcome</h1>, what is the content (the words you'd see)?