0
0
HTMLmarkup~5 mins

Global attributes in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are global attributes in HTML?
Global attributes are special attributes that can be used on any HTML element to add extra information or control behavior.
Click to reveal answer
beginner
Name three common global attributes in HTML.
Three common global attributes are:<br>1. id - unique identifier<br>2. class - groups elements<br>3. style - inline CSS styling
Click to reveal answer
intermediate
What does the tabindex global attribute do?
The tabindex attribute controls the order in which elements receive keyboard focus when pressing the Tab key. It helps with keyboard navigation.
Click to reveal answer
intermediate
How does the aria-label attribute help users?
The aria-label attribute provides a text label for elements, especially for screen readers. It improves accessibility by describing elements that might not have visible text.
Click to reveal answer
beginner
Can the style attribute be used on any HTML element? Why?
Yes, the style attribute is a global attribute and can be used on any HTML element to apply CSS styles directly to that element.
Click to reveal answer
Which of the following is NOT a global attribute in HTML?
Aid
Bhref
Cclass
Dstyle
What does the hidden global attribute do?
AMakes the element invisible and not focusable
BChanges the text color
CAdds a tooltip
DMakes the element editable
Which global attribute helps improve accessibility by labeling elements for screen readers?
Aclass
Bstyle
Caria-label
Did
How can you group multiple elements for styling or scripting?
AUsing the <code>class</code> attribute
BUsing the <code>id</code> attribute
CUsing the <code>style</code> attribute
DUsing the <code>tabindex</code> attribute
Which global attribute controls keyboard focus order?
Ahidden
Bstyle
Caria-label
Dtabindex
Explain what global attributes are and why they are useful in HTML.
Think about attributes that work everywhere in HTML.
You got /3 concepts.
    Describe how the aria-label and tabindex attributes improve accessibility.
    Focus on how these help people who use keyboards or screen readers.
    You got /3 concepts.