This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5 Semantics – 1”.
1. Which of the following is not a semantic element?
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
3. Which element works as a sidebar?
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> .
4. Which of the following defines a visible heading for <details> element?
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.
5. Which of the following specifies the main content of the document?
Explanation: 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.
6. Which element defines additional details?
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.
7. Which of the following specifies relationship between current document and external resource?
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.
8. Which element represents preformatted text?
Explanation: 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.
9. Which element is called bidirectional isolation?
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.
10. Which element is used for bringing attention?
Explanation: <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?
Explanation: 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.
12. Which of the following is keyboard input element?
Explanation: <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.
13. Which element prevents the text from automatically wrapping across multiple lines?
Explanation: <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?
Explanation: <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.
15. Which element represents a ruby annotation?
Explanation: 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.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.