Content · Web Development · HTML

Understanding HTML Tags, Elements, and Content

Tags are the angle-bracket markers such as <p> and </p>. The whole element includes the tags and the content between them; elements can also contain other elements.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

Tags are the angle-bracket markers such as <p> and </p>. The whole element includes the tags and the content between them; elements can also contain other elements.

What You Need to Know


In the example, section wraps a heading and a paragraph. The closing </section> belongs after both children, not before them.

The goal is not to collect as many tags as possible. Pick the element that best describes what the content really is.

Example: See It in Action


Here is a simple example to experiment with. Type it, save the file, and check what the browser displays.

This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.

<section>
    <h2>My hobbies</h2>
    <p>I enjoy cycling and painting.</p>
</section>

Let’s Understand the Example


  • Section groups content around a shared topic and usually has a heading.
  • An h2 starts a major section beneath the page topic.
  • A p groups a paragraph of related text. Start another paragraph for a new thought.

You should see a readable heading and its related content. The heading level tells readers how the ideas fit together, not merely how large the letters look.

What Should You See?


The page should display “My hobbies” as a heading, followed by its related content. Change the heading text and refresh the browser to see the result.

Read only the headings, from top to bottom. Do they tell a sensible story? If not, move sections or choose levels that match the content.

Try It Yourself


  1. Point out the opening tag, closing tag, and content in the paragraph example.
  2. Save your changes, open or refresh the page, and compare the result with the original example.
  3. Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.

Common Beginner Mistakes


  • Calling the words inside a tag the entire element, or forgetting a needed closing tag.
  • Avoid picking tags just for their default bold, italic or spaced appearance. Use CSS for presentation.

Key Takeaways


  • Tags are the angle-bracket markers such as <p> and </p>.
  • Section groups content around a shared topic and usually has a heading.
  • In the example, section wraps a heading and a paragraph. The closing </section> belongs after both children, not before them.
Share this resourceSend this page to someone who may find it useful.