HTML5 HTML5 Semantic Elements 1 — Questions and Answers
Question 1: Which HTML5 element is used to define the main navigation links of a document?
- <nav> (Correct answer)
- <menu>
- <header>
- <aside>
Correct answer: <nav>
The <nav> element defines a set of navigation links and is specifically intended for major navigation blocks.
Question 2: What is the purpose of the HTML5 <article> element?
- Defines independent, self-contained content (Correct answer)
- Wraps the entire page body
- Holds navigation links
- Defines a sidebar section
Correct answer: Defines independent, self-contained content
The <article> element represents a self-contained piece of content that could be independently distributed or reused, like a blog post.
Question 3: Which element represents content that is tangentially related to the main content, such as a sidebar?
- <aside> (Correct answer)
- <section>
- <figure>
- <details>
Correct answer: <aside>
The <aside> element holds content related to the surrounding content but considered separate, like a sidebar or pull quote.
Question 4: What does the <footer> element typically contain?
- Copyright, contact, and authorship information (Correct answer)
- Primary navigation links
- The page's main heading
- Interactive form controls
Correct answer: Copyright, contact, and authorship information
The <footer> element contains information about its nearest sectioning element, such as copyright notices, contact info, or related links.
Question 5: Which HTML5 element is used to group introductory or navigational content at the top of a section?
- <header> (Correct answer)
- <hgroup>
- <nav>
- <banner>
Correct answer: <header>
The <header> element represents introductory content or a group of navigational aids for its nearest sectioning ancestor.
Question 6: The <section> element in HTML5 is best described as:
- A generic thematic grouping of content with a heading (Correct answer)
- An element for displaying images
- A replacement for the <div> element in all cases
- A block for navigation menus only
Correct answer: A generic thematic grouping of content with a heading
The <section> element represents a thematic grouping of content and typically includes a heading, distinguishing it from a generic <div>.
Which HTML5 element is used to define the main navigation links of a document?