Challenge - 5 Problems
Global Attributes Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the purpose of the
tabindex global attribute?Which of the following best describes what the
tabindex attribute does when added to an HTML element?Attempts:
2 left
💡 Hint
Think about how keyboard users move through a webpage.
✗ Incorrect
The tabindex attribute controls the order in which elements are focused when a user presses the Tab key. This helps improve keyboard navigation and accessibility.
📝 Syntax
intermediate2:00remaining
Which option correctly uses the
aria-label global attribute?Select the HTML snippet that correctly uses the
aria-label attribute to provide an accessible name for a button.Attempts:
2 left
💡 Hint
The attribute needs a value inside quotes.
✗ Incorrect
The aria-label attribute must have a quoted string value that describes the element for screen readers. Option C correctly sets it.
❓ rendering
advanced2:00remaining
What is the visual effect of adding
hidden attribute to an element?Given this HTML snippet, what will you see in the browser?
HTML
<div>Visible text</div> <div hidden>Hidden text</div>
Attempts:
2 left
💡 Hint
The
hidden attribute hides the element completely.✗ Incorrect
The hidden attribute hides the element from view and it does not take up space on the page.
❓ selector
advanced2:00remaining
Which CSS selector targets all elements with the global attribute
contenteditable set to true?Choose the correct CSS selector to style all elements where
contenteditable is exactly true.Attempts:
2 left
💡 Hint
Attribute selectors use square brackets and quotes for exact matches.
✗ Incorrect
The selector [contenteditable="true"] matches elements whose contenteditable attribute value is exactly true.
❓ accessibility
expert2:00remaining
What is the effect of using
aria-hidden="true" on an element with visible content?If an element has visible text but includes
aria-hidden="true", what happens for screen reader users?Attempts:
2 left
💡 Hint
Think about hiding content from assistive technologies but not visually.
✗ Incorrect
The aria-hidden="true" attribute hides the element from screen readers, so they skip reading its content even if it is visible on screen.