HTML Questions & Answers – HTML5 Layout Elements

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5 Layout Elements”.

1. Which one of the following contains information about the author?
a) <footer>
b) <header>
c) <head>
d) <body>
View Answer

Answer: a
Explanation: Footer for its nearest sectioning content or sectioning root element is represented by <footer> element. It typically contains information about author of the section, links to related documents or copyright data. An introductory content lies in <header>. <head> is container for all head elements. A document’s body is defined by <body> tag.

2. Header element does not contain ___________
a) logo
b) <address>
c) heading elements
d) authorship information
View Answer

Answer: b
Explanation: <header> element contains one or more than one heading elements, authorship information, logo or icon. <header> tag can’t be placed inside <address> or <footer> or inside another <header> element.

3. Which element contains major navigational block?
a) <nav>
b) <address>
c) <footer>
d) <header>
View Answer

Answer: a
Explanation: The major navigational blocks on site like primary site navigation is contained by <nav> element.

advertisement
advertisement
 E.g. 
<nav>
<ul>
<li><a href="https://www.sanfoundry.com/" class= “dream”>HTML</a> </li>
<li><a href="https://www.sanfoundry.com/">CSS</a> </li>
<li><a href="https://www.sanfoundry.com/">PHP</a> </li>
</ul>
</nav>

Footer typically contains information about author of the section, links to related documents or copyright data. An introductory content lies in <header>. Contact information of author/owner of a document can be provided by <address> tag.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

4. Which element represents self-contained composition in document?
a) <nav>
b) <header>
c) <footer>
d) <article>
View Answer

Answer: d
Explanation: A self-contained composition in document, application, page or site that is intended to be independently distributable is represented by <article> element. Some of the examples are a magazine or newspaper article or a forum post, or a blog entry. <nav> element contains all the nevigation links. Footer typically contains information about author of the section, links to related documents or copyright data. An introductory content lies in <header>.

5. Which of the following element is used as a container for content?
a) <aside>
b) <article>
c) <address>
d) <footer>
View Answer

Answer: a
Explanation: <aside> element can be used inside <article> or outside it also. When it is used inside <aticle> it contains information that is related to article. When <aside> is used outside <article>, it acts as container for content that is related to the whole page. Contact information of author/owner of a document can be provided by <address> tag. Footer typically contains information about author of the section, links to related documents or copyright data.
advertisement

6. Which element groups related content together?
a) <aside>
b) <footer>
c) <section>
d) <div>
View Answer

Answer: c
Explanation: Grouping of related content together is done by <section> element. Each section will have its own heading. This element should not be used as wrapper for entire page. If we wish of containing a element for entire page, this will be best done by <div> element. Footer typically contains information about author of the section, links to related documents or copyright data. <aside> is a container of contetnt related to it’s surrounding. For grouping together related elements we use <div> element.

7. For grouping together one or more <h1> to <h6> element what element is used?
a) <header>
b) <hgroup>
c) <div>
d) <section>
View Answer

Answer: b
Explanation: For grouping together set of one or more <h1> to <h6> element we use <hgroup> element. We can group together the primary heading and the subheading. E.g. <hgroup> <h2> Winter is coming!</h2> <h3>Its too cold</h3> </hgroup>. Grouping of related content together is done by <section> element. For grouping together related elements we use <div> element. An introductory content lies in <header>.
advertisement

8. Which element is used for grouping together related elements?
a) <div>
b) <hgroup>
c) <section>
d) <header>
View Answer

Answer: a
Explanation: For grouping together related elements we use <div> element. Anything that lies outside of <footer>, <aside> or <content> elements can be considered as main content. E.g. <div class= “wrap”> <header> <h1> kitchen </h1> </div>. Grouping of related content together is done by <section> element. An introductory content lies in <header>. For grouping together set of one or more <h1> to <h6> element we use <hgroup> element.

Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.