HTML Questions & Answers – Semantic Structures and Elements

This set of HTML online quiz focuses on “Semantic Structures and Elements”.

1. Which of the following defines a part of text that might be formatted in a different direction from other text?

a) <details>
b) <aside>
c) <bdi>
d) <article>
View Answer
Answer: c
Explanation: The additional details the user wants to know as per the demand is fulfilled by <details> tag. Content related to surroundings is given by <aside> tag. <bdi> element is useful when embedding user-generated content with an unknown directional. <article> is self defined independent content which contains data which can be anything including photos, videos, and other contents. It provides a section.
 
 
2. Which of the following defines a caption for a figure element?

a) <figcaption>
b) <dialog>
c) <caption>
d) <figure>
View Answer
Answer: a
Explanation: The figcaption element can be placed as the first or last child of the figure element. It defines a caption for a figure element. Caption in a table immediately after <table> tag can be given by <caption> tag. The <figure> tag provides section for illustration, diagrams, photos etc. A box else window is defined by <dialog> tag in HTML.
 
 
3. Which of the following defines a command/menu item that the user can invoke from a popup menu?

advertisement
advertisement
a) <menuitem> 
b) <menu> 
c) <nav>
d) <class>
View Answer
Answer: a
Explanation: The menuitem tag is new in HTML5 and as of now is only supported in Firefox 8+ versions. <menuitem> defines a command item that the user can invoke from a popup menu. A list of of commands is defined by <menu> tag. <nav> is set of navigation links. One or more class names are specified by the global <class> attribute.
 
 
4. Which of the following tag defines the progress of a task?

Note: Join free Sanfoundry classes at Telegram or Youtube
a) <meter>
b) <progress>
c) <gauge>
d) <wbr>
View Answer
Answer: b
Explanation: Scalar measurement within range or may be a fractional value can be displayed through <meter> tag. Use the progress tag in conjunction with JavaScript to display the progress of a task. <wbr> is used for whether it is okay to add a line break in a text.
 
 
5. Which of the following defines the result of a calculation?

advertisement
a) <output>
b) <keygen>
c) <datalist>
d) <datalist>
View Answer
Answer: a
Explanation: The output tag represents the result of a calculation (like one performed by a script). <keygen> has been removed from HTML5 and it specifies a name to <keygen> element which refers to data after it’s submission. <datalist> is a list of pre-defined option for input element. The additional details the user wants to know as per the demand is fulfilled by <details> tag.
 
 
6. Which of the following defines graphic drawing using JavaScript?

advertisement
a) <class>
b) <canvas>
c) <graphics>
d) <draw>
View Answer
Answer: b
Explanation: One or more class names are specified by the global <class> attribute. The canvas tag is only a container for graphics, you must use a script to actually draw the graphics. <graphics> and <draw> are imaginary part.
 
 
7. Which of the following elements in HTML5 defines video or movie content?

a) <media>
b) <video>
c) <movie>
d) <audio>
View Answer
Answer: b
Explanation: The media to which linked document is optimized is given by <media> tag. Before HTML5, videos could only be played with a plug-in (like flash). The HTML5 video element specifies a standard way to embed a video in a web page. As like <video> elements, <audio> element contains additional files or streams like music, recording, etc.
 
 
8. Which of the following defines some content aside from the content it is placed in (like a sidebar)?

a) <aside> 
b) <header>
c) <sidebar>
d) <nav>
View Answer
Answer: a
Explanation: Content related to surroundings is given by <aside> tag. The aside content should be related to the surrounding content. An introductory content is represented by <header> element. The <nav> element contains list of navigation links.
 
 
9. Which of the following defines a visible heading for a details element?

a) <brief>
b) <summary>
c) <mark>
d) <main>
View Answer
Answer: b
Explanation: The main content of document is in <main>. <mark> is used to highlight the text to indicate it’s uniqueness. The summary tag defines a visible heading for the details element. The heading can be clicked to view/hide the details.
 
 
10. Which of the following defines additional details that the user can view or hide?

a) <details>
b) <article>
c) <aside>
d) <figure>
View Answer
Answer: a
Explanation: The additional details the user wants to know as per the demand is fulfilled by <details> tag. The details tag can be used to create an interactive widget that the user can open and close. Any sort of content can be put inside the details tag. <article> is self defined independent content which contains data which can be anything including photos, videos, and other contents. It provides a section. The <figure> tag provides section for illustration, diagrams, photos etc. Content related to surroundings is given by <aside> tag.
 
 
Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML for online Quizzes, 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.