Challenge - 5 Problems
Link Opener Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
Correct attribute to open link in new tab
Which attribute and value combination correctly opens a link in a new browser tab?
HTML
<a href="https://example.com" _____>Visit Example</a>
Attempts:
2 left
💡 Hint
The attribute starts with 'target' and the value is a special keyword.
✗ Incorrect
The 'target' attribute with value '_blank' tells the browser to open the link in a new tab or window.
🧠 Conceptual
intermediate2:00remaining
Security risk when opening links in new tab
What security risk can occur if you open links in a new tab using
target="_blank" without extra precautions?Attempts:
2 left
💡 Hint
Think about what the new page can do to the original page if not restricted.
✗ Incorrect
Without precautions, the opened page can use JavaScript to access the original page's window object, which can be a security risk.
❓ rendering
advanced2:00remaining
Visual result of link with target and rel attributes
What will the user see when clicking this link?
<a href="https://openai.com" target="_blank" rel="noopener">OpenAI</a>
HTML
<a href="https://openai.com" target="_blank" rel="noopener">OpenAI</a>
Attempts:
2 left
💡 Hint
rel="noopener" is a security feature that does not block opening.
✗ Incorrect
The link opens in a new tab due to target="_blank". The rel="noopener" attribute prevents the new page from accessing the original page's window object.
❓ accessibility
advanced2:00remaining
Accessibility best practice for links opening in new tabs
Which practice improves accessibility when links open in new tabs?
Attempts:
2 left
💡 Hint
Think about users who rely on screen readers or keyboard navigation.
✗ Incorrect
Informing users helps them understand the link behavior, which is important for screen reader users and those who prefer keyboard navigation.
❓ selector
expert2:00remaining
CSS selector for styling links that open in new tabs
Which CSS selector correctly targets all links that open in new tabs using
target="_blank"?Attempts:
2 left
💡 Hint
Attribute selectors use square brackets with attribute name and value.
✗ Incorrect
The selector a[target="_blank"] selects all elements with target attribute equal to '_blank'.