Challenge - 5 Problems
Anchor Tag Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate1:30remaining
What is the visible text of this anchor tag?
Look at the anchor tag below. What text will you see on the webpage?
HTML
<a href="https://example.com">Visit Example</a>
Attempts:
2 left
💡 Hint
The text between and tags is what shows on the page.
✗ Incorrect
The anchor tag shows the text inside it as clickable link text. Here, it is 'Visit Example'.
🧠 Conceptual
intermediate1:30remaining
What does the href attribute do in an anchor tag?
Choose the best description of the href attribute in an anchor tag.
Attempts:
2 left
💡 Hint
Think about what happens when you click a link.
✗ Incorrect
The href attribute tells the browser where to go when the link is clicked.
📝 Syntax
advanced2:00remaining
Which anchor tag opens the link in a new browser tab?
Select the anchor tag code that opens the link in a new tab when clicked.
Attempts:
2 left
💡 Hint
The target attribute controls where the link opens.
✗ Incorrect
Using target="_blank" tells the browser to open the link in a new tab or window.
❓ accessibility
advanced2:00remaining
Which anchor tag is best for accessibility?
Choose the anchor tag that improves accessibility by describing the link purpose clearly.
Attempts:
2 left
💡 Hint
Screen readers use aria-label to describe links better.
✗ Incorrect
Adding aria-label with a clear description helps users who rely on screen readers understand the link's purpose.
❓ selector
expert2:30remaining
Which CSS selector styles only anchor tags inside a nav element?
Select the CSS selector that applies styles only to anchor tags inside a
Attempts:
2 left
💡 Hint
Think about how CSS selects child elements inside parents.
✗ Incorrect
The selector 'nav a' targets all anchor tags inside any nav element, regardless of depth.