This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5 Semantics – 1”.
1. Which of the following is not a semantic element?
a) <form>
b) <article>
c) <table>
d) <span>
View Answer
Explanation: Semantic element describes its meaning to both developer and browser. Some of the semantic elements are <article>, <form>, <table>. Non-semantic elements are <span> and <div> and they tell nothing about their content.
2. Footer element can’t contain ____________ information.
a) contact information
b) copyright information
c) the author of the document
d) blog post
View Answer
Explanation: A footer for a document or section is specified by <footer> element. It should contain information about its containing element. This element typically contains the author of the document, links to terms of use, copyright information, contact information.
3. Which element works as a sidebar?
a) header
b) footer
c) nav
d) aside
View Answer
Explanation: <aside> element works like a sidebar. It defines some content aside from the content it is placed in. It should be related to the surrounding content. E.g. <aside> <h3> Florida </h3>< <p> Florida is a very cold place. </p> </aside>. <footer> element contains copyright information about author/owner of the document. All navigation links are contained in <nav> element. <header> specifies heading for the document.
4. Which of the following defines a visible heading for <details> element?
a) <summary>
b) <section>
c) <mark>
d) <main>
View Answer
Explanation: The <summary> tag is new in HTML5. <summary> element defines a visible heading for <details> element. This heading can be clicked to hide/view the details. This element is not supported by Internet Explorer. Sections in document is defined by <section> element. <mark> element is used to highlight the context/paragraph/text. Main content of document is specified by <menu> element.
5. Which of the following specifies the main content of the document?
a) <time>
b) <main>
c) <details>
d) <section>
View Answer
Explanation: Human readable date/time is shown by <time> element. The main content of a document is specified by <main> element. The content written inside <main> element should be unique to the document. It should not contain any content that is repeated across documents such as navigation links, copyright information, site logos, search forms. Sections in document is defined by <section> element. The additional details that the user can view or hide on demand is specified by <details> tag.
6. Which element defines additional details?
a) <details>
b) <summary>
c) <main>
d) <aside>
View Answer
Explanation: The additional details that the user can view or hide on demand is specified by <details> tag. The content of <details> element should not be visible unless open attribute is set. This tag can be used for creating interactive widget that user can open and close. Main content of document is specified by <menu> element. <aside> defines some content aside from the content it is placed in.
7. Which of the following specifies relationship between current document and external resource?
a) <meta>
b) <style>
c) <link>
d) <title>
View Answer
Explanation: Relationship between current document and external resource is specified by <link> element. The possible uses for this element include defining relational framework for navigation. It is mostly used to link to style sheets. <title> element specifies title of the document. Metadata about HTML document is provided by <meta> element. <style> element specifies style information about the HTML document.
8. Which element represents preformatted text?
a) <main>
b) <dir>
c) <dd>
d) <pre>
View Answer
Explanation: Main content of document is specified by <menu> element. <dir> element is not supported in HTML5. It contains all directory titles. The <pre> element in HTML represents preformatted text. The text written inside <pre> element is presented exactly as written in HTML file. Text is typically rendered using non-proportional font. Whitespace inside the element is displayed as written. <dd> is used to describe a name in description list.
9. Which element is called bidirectional isolation?
a) <bdi>
b) <bdo>
c) <br>
d) <b>
View Answer
Explanation: <bdi> element is known as bidirectional isolation. It isolates a span of text that might be formatted in different direction from other text outside it. This element is useful at the time of embedding text with an unknown directionality from database like inside text with a fixed directionality. <br> is used for giving a break-line in text. <b> is used for making the text bold. To override the current text direction <bdo> element is used.
10. Which element is used for bringing attention?
a) <cite>
b) <br>
c) <b>
d) <code>
View Answer
Explanation: Title of work is defined by <cite> tag. <br> is used to give a vertical break in text/paragraph. The <code> element displays its contents styles in a fashion intended to indicate that text is a short fragment of computer code. <b> element is known as HTML Bring Attention To element. It is used to draw reader’s attention to the element’s contents, which are not granted special importance otherwise. Formally this was known as Boldface element.
11. Which element denotes that the text is a short fragment of computer code?
a) <code>
b) <data>
c) <cite>
d) <dfn>
View Answer
Explanation: Title of work is defined by <cite> tag. The <code> element displays its contents styles in a fashion intended to indicate that text is a short fragment of computer code. The content text is displayed using user agent’s default monospace font by default. <data> element links content with machine readable translation. Defining instance of a term in HTML is represented by <dfn> element.
12. Which of the following is keyboard input element?
a) <mark>
b) <kbd>
c) <dfn>
d) <em>
View Answer
Explanation: <mark> element is for highlighting the text/paragraph. <kbd> element is HTML Keyboard Input Element. It represents a span of inline text denoting textual user input from voice input, a keyboard or any other text entry device. By convention user defaults to rendering the contents of <kbd> element using its default monospace font. Defining instance of a term in HTML is represented by <dfn> element. <em> is same like <i></i>. It is emphasized text.
13. Which element prevents the text from automatically wrapping across multiple lines?
a) <em>
b) <kbd>
c) <mark>
d) <nobr>
View Answer
Explanation: <em> is same like <i></i>. It is emphasized text. <kbd> element is HTML Keyboard Input Element. <mark> element is for highlighting the text/paragraph. <nobr> is non-standard obsolete HTML element. This element prevents the text it contains from automatically wrapping across multiple lines. Resulting in the user having to scroll horizontally to see entire width of the text.
14. Which of the following element is known as ruby fallback parenthesis?
a) <rt>
b) <rp>
c) <rtc>
d) <q>
View Answer
Explanation: In ruby, <rt> defines explanation of characters. <rp> is Ruby Fallback Parenthesis element in HTML. It is used to provide fall-back parentheses for browsers that do not support display of ruby annotations when using <ruby< element. This element include global attribute only. <q> element is used for short quotation.
15. Which element represents a ruby annotation?
a) <rt>
b) <rtc>
c) <ruby>
d) <rp>
View Answer
Explanation: In ruby, <rt> defines explanation of characters. The <ruby> element in HTML represents a ruby annotation. It is for showing pronunciation of East Asian characters. Both the starting and ending tags are necessary. It only includes global attributes. Parenthesis for ruby text is provided by <rp> element.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Computer Science Books
- Practice Computer Science MCQs
- Apply for Computer Science Internship
- Check HTML Books
- Practice Information Science MCQs