Challenge - 5 Problems
Semantic Layout Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate2:00remaining
What is the visual output of this HTML structure?
Consider this HTML code:
What will the browser display?
<header><h1>Welcome</h1></header> <main><p>Main content here.</p></main> <footer><p>Footer info</p></footer>
What will the browser display?
HTML
<header><h1>Welcome</h1></header> <main><p>Main content here.</p></main> <footer><p>Footer info</p></footer>
Attempts:
2 left
💡 Hint
Think about the natural order of header, main, and footer in HTML.
✗ Incorrect
The header appears first with the heading, then the main content paragraph, then the footer paragraph. This is the normal flow in the browser.
🧠 Conceptual
intermediate1:30remaining
Which semantic element is best for the main content?
You want to mark the main part of your webpage that holds the primary information. Which HTML element should you use?
Attempts:
2 left
💡 Hint
The element should represent the main content unique to the page.
✗ Incorrect
The element is designed to hold the main content of the page, distinct from headers, footers, and navigation.
❓ selector
advanced1:30remaining
Which CSS selector targets only the footer element?
Given this HTML:
Which CSS selector will style only the footer?
<header>...</header> <main>...</main> <footer>...</footer>
Which CSS selector will style only the footer?
Attempts:
2 left
💡 Hint
The selector matches the element name you want to style.
✗ Incorrect
The selector 'footer' matches all
❓ layout
advanced2:30remaining
How to keep footer at bottom of viewport if content is short?
You want the footer to always appear at the bottom of the browser window even if the main content is small. Which CSS approach works best?
Attempts:
2 left
💡 Hint
Think about a layout that stretches main content to fill space pushing footer down.
✗ Incorrect
Using flexbox on the body with column direction and letting main grow fills vertical space, pushing footer to bottom naturally.
❓ accessibility
expert3:00remaining
Which ARIA role best describes the main content for screen readers?
You want to improve accessibility by explicitly marking the main content region for assistive technologies. Which ARIA role should you add to the <main> element?
Attempts:
2 left
💡 Hint
The role should match the main content landmark.
✗ Incorrect
The ARIA role 'main' identifies the primary content area to screen readers, matching the semantic meaning of the element.