HTML Questions & Answers – HTML5 Semantics – 2

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5 Semantics – 2”.

1. Which element is used to enclose inline text?
a) <samp>
b) <small>
c) <s>
d) <rtc>
View Answer

Answer: a
Explanation: Inline are used to define the meaning or style of text. <samp> is HTML Sample Element. It is used to enclose inline text which represents sample output from a computer program. Its content is typically rendered using browser’s default mono spaced font. <small> makes text size small in appearance. <s> element specifies things which are no longer right. <rtc> is a Ruby Text Container.

2. Which of the following is a generic inline container for phrasing content?
a) <strong>
b) <sub>
c) <span>
d) <sup>
View Answer

Answer: c
Explanation: <strong> element shows importance of text. <sub> element is for subscript. <span> HTML element is a generic inline container for phrasing content, that does not inherently represent anything. It is used to group elements for styling purposes with the help of class or id attributes. <sup> is for superscript.

3. Which of the following element is known as Teletype Text element?
a) <time>
b) <tt>
c) <wbr>
d) <sup>
View Answer

Answer: b
Explanation: <time> element specifies time. <tt> element is known as HTML Teletype Text element. It creates inline text which is presented using agent’s default monospace font face. This element is obsolete. It was created for the purpose of rendering text as it would be displayed on a fixed-width display like text-only screen, teletype or line printer. <sup> element for superscript. <wbr> element describes a word break opportunity.
advertisement
advertisement

4. Variable element is ________
a) <var>
b) <wbr>
c) <sup>
d) <time>
View Answer

Answer: a
Explanation: <sup> element for superscript. element describes a word break opportunity. <time> element specifies time. <var> is known as HTML Variable element. It represents name of a variable in mathematical expression or in a programming context. It is presented using italicized version of current typeface.

5. Which element represents word break opportunity?
a) <var>
b) <sup>
c) <wbr>
d) <rtc>
View Answer

Answer: c
Explanation: <var> is known as HTML Variable element. <wbr> element represents word break opportunity. A position within text where browser may optionally break a line. This element only includes global attributes. It is supported by most of the browsers. <sup> element is superscript. <rtc> is a Ruby Text Container.

6. Which of the following is known as child of media elements?
a) <area>
b) <img>
c) <map>
d) <track>
View Answer

Answer: d
Explanation: <area> element defines region on image. element is used to insert image in document. <track> element is used as a child of media elements <video> and <audio>. It lets you specify text tracklike to automatically handle subtitles. The tracks are formatted in WebVTT format like .vtt files. <map> with <area> element is used to define image.

7. Which element embeds a Java applet into the document?
a) <applet>
b) <embed>
c) <noembed>
d) <object>
View Answer

Answer: a
Explanation: <applet> is known as HTML Applet Element. It embeds Java applet into the document. But now a days use of Java applets on Web is deprecated. Most of the browsers no longer support use of plug-ins. <embed> element embeds external content in document. <noembed> is fallback content for browsers. <object> element describes an external resource.
advertisement

8. Which element defines parameters for <object> element?
a) <noembed>
b) <param>
c) <source>
d) <embed>
View Answer

Answer: b
Explanation: <noembed> is fallback content for browsers. <object> element describes an external resource. <embed> element embeds external content in document. <param> element defines parameters for <object> element. The element includes global attributes. This element is supported by all the browsers. <source> element specifies multimedia resources for pictures, audio etc.

9. Which element represents an external resource?
a) <object>
b) <source>
c) <param>
d) <picture>
View Answer

Answer: a
Explanation: An external resource is represented by <object> element that can be treated as image, nested browsing context or a resource to be handled by plugin. It includes various attributes like archive, border, classid, codebase, codetype etc. <source> element specifies multimedia resources for pictures, audio etc. <param> element defines parameters for <object> element. An element <picture> contains <source> element and <image>.
advertisement

10. Which element specifies multiple media resources?
a) <param>
b) <source>
c) <object>
d) <picture>
View Answer

Answer: b
Explanation: <param> element defines parameters for <object> element. An element <picture> contains <source> element and <image>. <source> element in HTML specifies multiple media resource for <audio>, <video> and <picture> element. It is an empty element and is commonly used to serve same media content in multiple formats supported by different browsers. An external resource is represented by <object> element that can be treated as image, nested browsing context or a resource to be handled by plugin.

11. Which element is not a scripting element?
a) <noscript>
b) <canvas>
c) <script>
d) <picture>
View Answer

Answer: d
Explanation: For creating dynamic content and web applications HTML uses scripting languages. <canvas>, <script>, <noscript> are certain elements that support this capability. <picture> element is for embedding the content.

12. Which element shows completion progress of a task?
a) <progress>
b) <select>
c) <option>
d) <meter>
View Answer

Answer: a
Explanation: <progress> element in HTML shows an indicator indicating completion progress of a task, which is typically displayed as a progress bar. It also includes all the global attributes including max, value etc. <select> element specifies control over a menu of options. <option> represent item contained in <select> element. <meter> gives a scalar range of value.

13. Which element creates a grouping of options?
a) <progress>
b) <option>
c) <optgroup>
d) <select>
View Answer

Answer: c
Explanation: <progress> element in HTML shows an indicator indicating completion progress of a task, which is typically displayed as a progress bar. <select> element specifies control over a menu of options. <option> represent item contained in <select> element. <optgroup> element in HTML creates a grouping of options within <select> element. This element should not be nested. It includes global attributes like disabled, label and many more.

14. Which element represents a scalar value within the given range?
a) <option>
b) <meter>
c) <label>
d) <input>
View Answer

Answer: b
Explanation: <option> represent item contained in <select> element. <meter> element in HTML represents either a scalar value within a known range or a factorial value. It includes global attributes like min, max, value, optimum, low, high, form etc. <label> specifies a caption for item in user interface. <input> element is used to take user input from user.

15. Which element is used to draw graphics and animations?
a) <canvas>
b) <script>
c) <noscript>
d) <picture>
View Answer

Answer: a
Explanation: <canvas> element is used with either canvas scripting APII or WebGL API to draw graphics and animations. Basically it includes all the global attributes like height, moz-opaque, width. It is not supported in Opera browser. <script> is used for embeding javascript code in document. An element <picture> contains <source> element and <image>. <noscript> defines section of HTML.

Sanfoundry Global Education & Learning Series – HTML.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.