HTML Questions & Answers – Embracing the Reality of Web Markup

This set of HTML Questions and Answers for Experienced people focuses on “Embracing the Reality of Web Markup”.

1. Which of the following element represents a thematic break rather than a horizontal rule, though that is the likely representation?

a) <dd>
b) <dt>
c) <hr>
d) <menu>
View Answer
Answer: c
Explanation: The <dd> & <dt> tag defines names/terms. <menu> tag in HTML is for list of commands. The hr tag defines a thematic break in an HTML page (e.g. a shift of topic). Thematic is break between paragraph-level elements.
 
 
2. Which of the following element was redefined to represent user interface menus, including context menus?

a) <ul>
b) <dt>
c) <hr>
d) <menu>
View Answer
Answer: d
Explanation: <dt> tag defines terms/names. The <hr> tag is used for thematic break between paragraph-level. <ul> tag is used to represent list of items/objects. <menu> tag in HTML is for list of commands. The menu tag is used for context menus, toolbars and for listing form controls and commands.
 
 

3. Which of the following HTML 4 attributes is not removed in HTML5?
a) text
b) rules
c) link
d) mark
View Answer

Answer: d
Explanation: Mark attribute is still used in HTML5 but rest of attributes i.e. text, rules, link are deprecated in HTML5.
advertisement
advertisement

4. Which of the following element is not removed by HTML5?
a) vlink
b) span
c) marginwidth
d) compact
View Answer

Answer: b
Explanation: A <span> element (used to color a part of a text) is still used in HTML5. Elements like vlink, marginwidth and compact has been removed in HTML5, which were part of HTML markup. In earlier they have been deprecated.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

5. Which of the following is not a newly added element in HTML5?
a) article
b) audio
c) nav
d) frameset
View Answer

Answer: d
Explanation: An article tag is semantic element newly introduced in HTML5 along with nav and audio. Frameset was already introduced in HTML markup used to divide window/web page in frames.

6. ____________ defines the accelerator key to be used for keyboard access to an element.
a) data-X
b) accesskey
c) rp
d) command
View Answer

Answer: b
Explanation: Command tag specifies a command provided with action. When one want to provide parentheses around ruby text, rp tag is used. The accesskey attribute specifies a shortcut key to activate/focus an element. Data-X stores data.
advertisement

7. Which of the following element represents the header of a section or the document and contains a label or other heading information for the related content?
a) data-X
b) header
c) mark
d) meter
View Answer

Answer: b
Explanation: Data-X element consist of data. The mark element indicates highlighted/marked text. The header element represents a container for introductory content or a set of navigational links.

8. Which of the following element sets is an item of metadata?
a) itemscope
b) itemref
c) itemtype
d) none of the mentioned
View Answer

Answer: a
Explanation: Itemscope is a boolean global attribute that defines the scope of associated metadata. The itemscope attribute creates a new item, a group of name-value pairs. The URL of vocabulary is specified by itemtype global attribute. List of element ID’s is provided by itemref.
advertisement

9. _____________ defines a group of content that should be used as a figure and may be labeled by a legend element.
a) figure
b) details
c) output
d) aside
View Answer

Answer: a
Explanation: The aside tag contains data related to its surrounding. <output> is result of anything. The figure tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. Additional details that someone wants to know or hide as per demand are provided by details element.

Sanfoundry Global Education & Learning Series – HTML.

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