Semantic HTML — Headers and Footers Quiz

Quiz 7 8 questions

Prerequisites for the quiz

  1. Semantic HTML — Headers and Footers
  2. All previous chapters

Are you ready?

8 questions to solve

Instructions
  1. This quiz goes to full-screen once you press the Start button.
  2. At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
The <header> element can be used more than once on a webpage. True or false?
Indeed, the <header> element can be used more than once on a webpage. Many HTML developer might not know of this fact of <header>. For more information, refer to Semantic HTML — Headers.

Consider the following illustration of a social media post:

Header of a social media post.
Can the <header> element be used to denote the section represented by the blue-bordered box?
We can clearly see that the blue-bordered box denotes the top-most portion of the social media post, and that aligns with the idea behind <header>. Hence, the correct choice is (A). For more information, refer to Semantic HTML — Headers.
Select all of the following descriptions that apply to the <header> element:
The <header> element is used to denote introductory content. And, in that way, it can be used in directly inside <body> to denote the main header of a webpage. Hence, the correct descriptions are (B) and (C) only. For more information, refer to Semantic HTML — Headers.
The <header> element can go inside a <header>. True or false?
As per the HTML standard, it's semantically invalid to nest <header> inside <header>. Hence, the given statement is false. For more information, refer to Semantic HTML — Headers.
In terms of source code, the <footer> element must be the last element in the section that it appears in. True or false?
False. Although it's usually the case, there's nothing in the current HTML standard that says that <footer> has to be the last element in another element's source code. For more information, refer to Semantic HTML — Footers.
It's better to use <header> to denote a header than using a <div>. True or false?
Absolutely true. In fact that's the point of the <header> element — to stop using <div> to denote headers of given pieces of content, and instead use a more meaningful element in place of it. For more information, refer to Semantic HTML — Headers.
When <header> is used in a section, <footer> can't be used in that same section anywhere. True or false?
False. In fact, it's very common for <header> and <footer> both to be used in the same section, one to denote its header and the other to denote its footer. For more information, refer to Semantic HTML — Headers and Footers.

Consider the following illustration of a social media post:

Footer of a social media post.
Can the <footer> element be used to denote the section represented by the blue-bordered box?
The blue-bordered box denotes the bottom-most portion of the social media post, and that aligns with the idea behind <footer>. Hence, the correct choice is (A). For more information, refer to Semantic HTML — Footers.

"I created Codeguage to save you from falling into the same learning conundrums that I fell into."

— Bilal Adnan, Founder of Codeguage