0
0
HTMLmarkup~20 mins

Opening and closing tags in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Tag Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
1:30remaining
Identify the correct closing tag
Which option correctly closes the <section> tag in HTML?
HTML
<section>
  <p>Welcome to the section.</p>
</section>
A&lt;/sect&gt;
B&lt;/section&gt;
C&lt;/div&gt;
D&lt;/article&gt;
Attempts:
2 left
💡 Hint
Remember, the closing tag must match the opening tag exactly.
rendering
intermediate
2:00remaining
What is the visual output of missing closing tag?
What will the browser display if the <h1> tag is not closed properly?
HTML
<h1>Welcome to my site
<p>This is a paragraph.</p>
AThe heading text includes the paragraph text inside it, styled as heading.
BThe heading and paragraph appear normally, heading styled as large text.
COnly the paragraph text appears, heading is ignored.
DThe browser shows a syntax error message.
Attempts:
2 left
💡 Hint
Browsers automatically close heading tags like <h1> before block elements like <p> due to HTML parsing rules.
🧠 Conceptual
advanced
1:30remaining
Why are closing tags important in HTML?
Which option best explains why closing tags are necessary in HTML?
AThey improve page loading speed by reducing code size.
BThey are optional and only used for styling purposes.
CThey tell the browser where an element ends, helping structure the page correctly.
DThey are only needed for self-closing tags like <img>.
Attempts:
2 left
💡 Hint
Think about how the browser understands where content belongs.
selector
advanced
1:30remaining
Which tag pair is correctly opened and closed?
Select the option where both opening and closing tags are correct and match each other.
A&lt;header&gt; ... &lt;/head&gt;
B&lt;nav&gt; ... &lt;/navigation&gt;
C&lt;footer&gt; ... &lt;/foot&gt;
D&lt;article&gt; ... &lt;/article&gt;
Attempts:
2 left
💡 Hint
Check if the closing tag exactly matches the opening tag name.
accessibility
expert
2:00remaining
How do proper closing tags affect screen readers?
Why is it important for accessibility tools like screen readers to have correct opening and closing tags in HTML?
AThey help screen readers understand the page structure and read content in the right order.
BThey allow screen readers to skip all content inside tags.
CThey are not important because screen readers ignore HTML tags.
DThey make the page load faster for screen readers.
Attempts:
2 left
💡 Hint
Think about how screen readers navigate content.