This set of HTML Mcqs focuses on “HTML and XHTML Element Reference”.
1. Which attribute specifies a unique alphanumeric identifier to be associated with an element?
2. The _____________ attribute specifies an inline style associated with an element, which determines the rendering of the affected element.
d) none of the mentioned
Explanation: The style attribute will override any style set globally, e.g. styles specified in the style tag or in an external style sheet.
3. Which attribute is used to provide an advisory text about an element or its contents.
d) none of the mentioned
Explanation: The information is most often shown as a tooltip text when the mouse moves over the element.
4. The __________ attribute sets the text direction as related to the lang attribute.
Explanation: The dir attribute specifies the text direction of the element’s content.
5. Which of the following is the attribute that specifies the column name from the data source object that supplies the bound data?
Explanation: datafld attribute specifies the column name from the data source object that supplies the bound data. This attribute is specific to Microsoft’s data binding.
6. Which of the following is the attribute that indicates the name of the data source object that supplies the data that is bound to this element?
Explanation: When the dataSrc property is applied to a tabular data consumer, the entire data set is repeated by the consuming elements.
7. Which of the following is the attribute that specifies additional horizontal space, in pixels, to be reserved on either side of an embedded item like an iframe, applet, image, and so on?
Explanation: The hspace attribute specifies the whitespace on left and right side of an object.
8. The accesskey attribute specifies a keyboard navigation accelerator for the element.
Explanation: The accesskey attribute specifies a shortcut key to activate/focus an element.
9. Which of the following is the attribute that is used to set a global identifier for a microdata item?
Explanation: It allows a vocabulary to define a global identifier for a microdata item, for example an ISBN number on a book. Use itemid on the same element as the item’s itemscope and itemtype attributes.
10. Which of the following is the attribute that is used to add a name/value pair to a microdata item?
Explanation: To add a property to an item, the itemprop attribute is used on one of the item’s descendants. Markup without the microdata-related attributes does not have any effect on the microdata model.
Sanfoundry Global Education & Learning Series – HTML.
To practice MCQs on all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.