HTML Questions & Answers – Major HTML5 Themes

This set of HTML Quiz focuses on “Major HTML5 Themes”.

1. All elements are identified by their __________ and are marked up using either start tags and end tags or self-closing tags.
a) attribute name
b) tag name
c) class name
d) none of the mentioned
View Answer

Answer: b
Explanation: The attribute name describes name of <input> element. The tagName property returns the tag name of the element. In HTML, the returned value of the tagName property is always in UPPERCASE. Name of class is returned by class name.

2. The __________ element represents a span of text that is isolated from its surroundings for the purposes of bidirectional text formatting.
a) b
b) bdi
c) bdo
d) base
View Answer

Answer: b
Explanation: The base Url target relative to all URL’s in document is specified by base tag in html. B is for bold text representation. bdi stands for Bi-directional Isolation. This element is useful when embedding user-generated content with an unknown directionality. Direction of text is displayed by bdo element.

3. The interactive element audio with the attribute controls must not appear as a descendant of which element?
a) a
b) button
c) audio
d) both a and button
View Answer

Answer: d
Explanation: The anchor and the button tag acts as link which cannot be a parent of audio element.
advertisement
advertisement

4. A ____________ element must have a start tag but must not have an end tag.
a) details
b) command
c) code
d) both details and command
View Answer

Answer: b
Explanation: The command tag is new in HTML5 and specifies a normal command with an action. Details has end tag.

5. Which type attribute of input element sets the element’s value to a string representing a number?
a) range
b) email
c) file
d) date
View Answer

Answer: a
Explanation: The input element with a type attribute whose value is “range” represents an imprecise control for setting the element’s value to a string representing a number.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the following type attributes of input element defines control for entering a telephone number?
a) mob
b) tel
c) mobile
d) telephone
View Answer

Answer: b
Explanation: The input element with a type attribute whose value is “tel” represents a one-line plain-text edit control for entering a telephone number.

7. Which element represents a control for generating a public-private key pair?
a) ins
b) keygen
c) key
d) command
View Answer

Answer: b
Explanation: The command tag is new in HTML5 and specifies a normal command with an action. The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.
advertisement

8. The World Wide Web’s markup language has always been HTML.
a) True
b) False
View Answer

Answer: a
Explanation: The World Wide Web’s markup language has always been HTML. HTML was primarily designed as a language for semantically describing scientific documents, although its general design and adaptations over the years have enabled it to be used to describe a number of other types of documents.

9. Which element represents marked or highlighted text for reference purposes?
a) highlight
b) mark
c) strong
d) blink
View Answer

Answer: b
Explanation: Highlight element is used to highlight a particular text when used in a document. Strong element specifies the importance of text. The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. An enclosed text which flashes later on is created by blink element.
advertisement

10. Which element(s) represents a section of a document that links to other documents?
a) navigation
b) anchor tag
c) nav
d) option
View Answer

Answer: c
Explanation: The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.

11. Which of the following element marks the ruby text component of a ruby annotation?
a) r
b) rt
c) ruby
d) rubytxt
View Answer

Answer: b
Explanation: A ruby annotation is specified by ruby text, which is small text attached to the main text, which is used to indicate the pronunciation of characters. The rt element is the markup for ruby text.

12. Subtitle tracks and caption tracks to be specified for audio and video elements can be added using which of the following element?
a) sink
b) track
c) stable
d) caption
View Answer

Answer: b
Explanation: The track element enables supplementary media tracks such as subtitle tracks and caption tracks to be specified for audio and video elements.

Sanfoundry Global Education & Learning Series – HTML.

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