Semantic HTML Flashcards
What does “semantic” refer to in web development?
Semantic refers to meaning.
What is Semantic HTML?
Semantic HTML structures content based on the meaning of each element, helping automated tools like screen readers interpret the markup.
What are the three main components built during browser parsing?
DOM (Document Object Model)
CSSOM (CSS Object Model)
Accessibility Tree
What is the purpose of the Accessibility Tree?
The Accessibility Tree is used by assistive devices via the Accessibility Object Model (AOM).
What is the role of <header>
in semantic HTML?
The role of <header>
is banner.
What is the role of <footer> in semantic HTML?
The role of <footer>
is contentInfo
.
What is the role of <nav>
in semantic HTML?
The <nav>
element is used for navigation but does not have an implicit role.
What is the purpose of the role attribute in HTML?
The role attribute describes the role of an element in the document.
Which HTML elements have implicit roles?
- Buttons
- Links
- Ranges
- Checkboxes
What can be assigned roles using the role attribute?
Non-semantic elements can be assigned roles using the role attribute.
What is the key question to ask when choosing a semantic HTML element?
Which element best represents the function of this section of markup?