Choosing Semantic Elements
Which HTML tag is most appropriate for marking up the primary navigation section of a webpage to help screen readers and assistive technology?
- u003Cnavu003E
- u003Cmainu003E
- u003Cdivu003E
- u003Carticleu003E
- u003Casideu003E
Alternative Text for Images
What attribute should you add to an u003Cimgu003E tag to provide a text description for users who cannot see the image?
- alt
- title
- src
- description
- aria-label
Headings Hierarchy
Why is it important to use heading tags (u003Ch1u003E to u003Ch6u003E) in the correct order and not skip levels when structuring a page?
- It helps screen readers and users understand the document structure
- It makes the text automatically bold
- It improves font size across browsers
- It changes the URL of the page
- It centers the text by default
Grouping Form Fields for Accessibility
Which elements should be used to group related input fields, such as several related checkboxes, and provide a caption for the group?
- fieldset and legend
- div and span
- section and label
- article and label
- ul and li
Purpose of the u003Cmainu003E Element
What is the semantic purpose of the u003Cmainu003E element in HTML?
- To contain the core content unique to the document
- To display background images
- To create a list of navigation links
- To show a sidebar
- To define multiple headers
Improving Table Accessibility
When creating an accessible HTML table, which attribute is used to associate table header cells with data cells?
- scope
- alt
- for
- heading
- aria-type
Language Identification for Accessibility
How do you specify the default natural language of an HTML page for assistive technology?
- Add a lang attribute to the u003Chtmlu003E tag
- Use the language meta tag
- Add a language class to the body
- Set a site-language property in CSS
- Include a u003Clocaleu003E element
ARIA Landmarks and Accessibility
What is a benefit of using ARIA landmark roles, such as role='navigation', in your HTML structure?
- They allow users of assistive technologies to quickly jump to important sections
- They change the color of navigation menus
- They automatically index the page for search engines
- They make the page load faster
- They increase font size
Styling and Semantic HTML
Why should you use semantic elements such as u003Csectionu003E and u003Carticleu003E instead of only layout elements like u003Cdivu003E?
- Semantic elements provide meaningful structure for both humans and machines
- Semantic elements always produce better colors
- Divs are not allowed in HTML5
- Only semantic elements can be styled with CSS
- Using div increases page speed
Associating Labels with Form Inputs
Which approach ensures that a screen reader user knows which text label goes with which form input?
- Using the u003Clabelu003E element with a for attribute matching the input's id
- Placing the label as a comment above the input
- Using u003Cspanu003E tags for labels
- Relying on placeholder text inside the input only
- Adding alt attributes to inputs