Challenge - 5 Problems
HTML Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
What error does this HTML snippet cause?
Look at this HTML code:
What problem will this cause when rendered in a browser?
<div>Hello<span>World</div></span>
What problem will this cause when rendered in a browser?
HTML
<div>Hello<span>World</span></div>
Attempts:
2 left
💡 Hint
Think about how tags must open and close in the right order.
✗ Incorrect
HTML tags must be properly nested. Here, <span> is opened inside <div> but closed after </div>, which breaks nesting. Browsers fix this by closing <span> early, changing the structure.
❓ accessibility
intermediate2:00remaining
Which option improves accessibility for this image?
You have this image tag:
Which option adds the best accessibility improvement?
<img src="flower.jpg">
Which option adds the best accessibility improvement?
HTML
<img src="flower.jpg">
Attempts:
2 left
💡 Hint
Think about screen readers and what they need to describe images.
✗ Incorrect
The alt attribute provides descriptive text for screen readers, helping visually impaired users understand the image content. Title is less reliable, aria-hidden hides the image from assistive tech, and role="presentation" removes semantic meaning.
❓ layout
advanced2:00remaining
What visual issue occurs with this CSS and HTML?
Given this HTML and CSS:
What will happen to the box inside the container?
<div class="container"><div class="box">Box</div></div>
.container { display: flex; } .box { width: 100px; margin-left: auto; }What will happen to the box inside the container?
HTML
<div class="container"><div class="box">Box</div></div>
Attempts:
2 left
💡 Hint
Remember how margin auto works inside flex containers.
✗ Incorrect
In a flex container, margin-left: auto pushes the item to the right, aligning it at the container's end.
❓ selector
advanced2:00remaining
Which CSS selector matches only direct children?
You want to style only <li> elements that are direct children of <ul>.
Which selector should you use?
Which selector should you use?
Attempts:
2 left
💡 Hint
Think about the difference between descendant and child selectors.
✗ Incorrect
The '>' selector matches only direct children. 'ul li' matches all descendants, including nested ones. '+' and '~' select siblings, not children.
🧠 Conceptual
expert2:00remaining
What is the effect of missing viewport meta tag on mobile?
Consider a webpage without this tag:
What will happen when viewed on a mobile device?
<meta name="viewport" content="width=device-width, initial-scale=1">
What will happen when viewed on a mobile device?
Attempts:
2 left
💡 Hint
Think about how browsers handle page scaling without instructions.
✗ Incorrect
Without the viewport meta tag, mobile browsers assume a desktop width and zoom out, causing small text and poor usability.