Content · Web Development · HTML

HTML Beginner Quiz: Tags, Elements, and Attributes

A quick quiz helps you notice what each piece of markup does. In <p>Hello</p>, the opening tag is <p>, Hello is content, and </p> is the closing tag.

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

A quick quiz helps you notice what each piece of markup does. In <p>Hello</p>, the opening tag is <p>, Hello is content, and </p> is the closing tag. Use this as a chance to build something rather than just read about it. There is no need to remember every tag immediately.

What You Need to Know


Try answering without looking back first. Then change the question into your own example that uses one attribute, such as href or id.

Try solving the task before checking the example. It is fine to make mistakes: each browser refresh gives you another chance to see what the markup actually does.

Example: See It in Action


Try this markup in a fresh practice file. The next section explains the parts worth paying attention to.

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

<h2>Quick quiz</h2>
<p>Which part is an opening tag?</p>
<ol>
    <li>&lt;p&gt;</li>
    <li>Hello</li>
    <li>&lt;/p&gt;</li>
</ol>

Let’s Understand the Example


  • 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.
  • Ol groups items whose order or numbering matters.

You should see distinct list items. Ask whether their order carries meaning: if the order matters, use an ordered list; otherwise use an unordered list.

What Should You See?


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

Try to explain the example to someone else in two sentences. If one line is mysterious, inspect that line instead of copying it blindly.

Try It Yourself


  1. Write three new questions: identify an element, an attribute name, and an attribute value.
  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


  • Confusing an attribute with the text between the opening and closing tags.
  • A page may appear fine while containing mistakes. Inspect the source and use a validator to check what you wrote.

Key Takeaways


  • A quick quiz helps you notice what each piece of markup does.
  • An h2 starts a major section beneath the page topic.
  • Try answering without looking back first. Then change the question into your own example that uses one attribute, such as href or id.
Share this resourceSend this page to someone who may find it useful.