0
0
HTMLmarkup~20 mins

Section and article in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Semantic Structure Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding semantic roles of
and
Which statement best describes the difference between the
and
elements in HTML5?
A<section> and <article> are interchangeable and have no semantic difference.
B<section> is used only for navigation menus, and <article> is used only for footers.
C<section> defines a thematic grouping of content, while <article> represents a self-contained composition that can be independently distributed.
D<section> is deprecated in HTML5, and <article> is used for all content grouping.
Attempts:
2 left
💡 Hint
Think about which element can stand alone and be shared separately.
📝 Syntax
intermediate
2:00remaining
Identify the correct HTML structure using
and
Which HTML snippet correctly uses
and
to structure a blog page with multiple posts?
A<section><article><h2>Post 1</h2><p>Content</p></article><article><h2>Post 2</h2><p>Content</p></article></section>
B<article><article><h2>Post 1</h2><p>Content</p></article><article><h2>Post 2</h2><p>Content</p></article></article>
C<section><section><h2>Post 1</h2><p>Content</p></section><section><h2>Post 2</h2><p>Content</p></section></section>
D<article><section><h2>Post 1</h2><p>Content</p></section><section><h2>Post 2</h2><p>Content</p></section></article>
Attempts:
2 left
💡 Hint
Think about which element groups multiple posts and which represents each post.
rendering
advanced
2:00remaining
Visual result of nested
and
What will the browser visually display for this HTML snippet?
HTML
<section>
  <h1>News</h1>
  <article>
    <h2>Headline 1</h2>
    <p>Details about headline 1.</p>
  </article>
  <article>
    <h2>Headline 2</h2>
    <p>Details about headline 2.</p>
  </article>
</section>
AA main heading 'News' followed by two separate subheadings 'Headline 1' and 'Headline 2' each with their paragraphs.
BThe browser shows a bulleted list of headlines without paragraphs.
COnly the main heading 'News' is shown; articles are hidden by default.
DThe content is displayed as a single paragraph without headings.
Attempts:
2 left
💡 Hint
Remember that semantic tags do not change default display but help organize content.
selector
advanced
2:00remaining
CSS selector targeting
inside
Which CSS selector correctly styles only
elements that are direct children of a
?
Asection + article { color: blue; }
Bsection article { color: blue; }
Carticle > section { color: blue; }
Dsection > article { color: blue; }
Attempts:
2 left
💡 Hint
The '>' selector targets direct children only.
accessibility
expert
3:00remaining
Improving accessibility with
and
Which practice improves screen reader navigation when using
and
elements?
AAvoid headings inside <article> to reduce clutter for screen readers.
BAdd aria-label or aria-labelledby attributes to <section> and <article> to describe their content.
CUse only <div> elements with no semantic tags to keep it simple.
DUse inline styles to hide <section> and <article> from screen readers.
Attempts:
2 left
💡 Hint
Think about how screen readers identify sections and articles.