Test Series - html

Test Number 8/72

Q: _________ is an HTML specification used to add more information to HTML tags.
A. Macrodata
B. Microdata
C. Minidata
D. Modifydata
Solution: The Microdata spec provides a standardized syntax for additional semantic markup to your web pages to enhance the machine readability of your web pages. The planning for distribution center operation is offered by minidata. Macrodata and Modifydata are not any terms related to HTML5.
Q: The microdata model consists of groups of name-value pairs known as ________
A. Item
B. Property
C. Value
D. URL
Solution: The microdata model consists of groups of name-value pairs known as items. Each group is known as an item. Each item can have item types, a global identifier (if the vocabulary specified by the item types support global identifiers for items), and a list of name-value pairs. A Uniform Resource Locator, called URL, termed as web address and is used for a reference to a web resource for finding its location. Property is information about a particular id or else attribute.
Q: Every HTML element may have an ____________ attribute specified.
A. itemtype
B. relevant types
C. itemscope
D. itemref
Solution: “itemtype” attribute specifies URL that is used to provide item’s data in data structure. An element with the itemscope attribute specified creates a new item, a group of name-value pairs.
Q: Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a meta element?
A. The value is the item created by the element
B. The value is the value of the element’s value attribute, if it has one, or the empty string otherwise
C. On getting, if the element has a datetime content attribute, the IDL attribute must return that content attribute’s value
D. The value is the element’s textContent
Solution: When the property value of a name-value pair added by an element with an itemprop attribute which is a meta element then the value is the value of the element’s value attribute, if it has one, or the empty string otherwise. The “itemprop” attribute is a global attribute which adds properties to item.
Q: Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a time element?
A. The value is the element’s datetime value
B. The value is the value of the element’s content attribute, if any, or the empty string if there is no such attribute
C. The value is the value of the element’s value attribute, if it has one, or the empty string otherwise
D. The value is the element’s textContent
Solution: The “itemprop” attribute is a global attribute which adds properties to item. When the property value of a name-value pair added by an element with an itemprop attribute which is a time element then the value is the element’s datetime value.
Q: The ___________ of an item is the value of its element’s itemid attribute.
A. token
B. typed item
C. global identifier
D. scope
Solution: The global identifier of an item is the value of its element’s itemid attribute, if it has one, resolved relative to the element on which the attribute is specified. If the itemid attribute is missing or if resolving it fails, it is said to have no global identifier. The “typed item” creates new item.
Q: If the element has an itemscope attribute, it returns an __________ object with all the element’s properties.
A. itemscope
B. dom object
C. collection.namedItem
D. itemtype
Solution: When an HTML document is loaded into a web browser, it becomes a document object. In web browser, document model represents document as a logical tree. The “itemscope” attribute which is of boolean type is used to state the scope of metadata.
Q: Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a data element?
A. The value is the value of the element’s value attribute if it has one, or the empty string otherwise
B. The value is the item created by the element
C. The value is the element’s datetime value
D. The value is item’s scope
Solution: The “itemprop” attribute is a global attribute which adds properties to item. When the property value of a name-value pair added by an element with an itemprop attribute which is a data element then the value is the value of the element’s value attribute if it has one, or the empty string otherwise.
Q: Which method takes a string that contains an unordered set of unique space-separated tokens that are case-sensitive, representing types?
A. document.getItems
B. element.itemProp
C. collection.namedItem
D. object.itemref
Solution: When called, the method must return a live NodeList object containing all the elements in the document, in tree order, that are each top-level microdata items whose types include all the types specified in the method’s argument, having obtained the types by splitting the string on spaces.
Q: The goal of microdata is to create a unified way to define the data in a way any web crawler or reader implementation can read it.
A. True
B. False
C. 1
D. 0
Solution: Microdata allows the user to create “custom” elements (sort of), to give a specific meaning to them. Microdata is an HTML specification is used to add more information to HTML. The Microdata spec provides a standardized syntax for additional semantic markup to your web pages to enhance the machine readability of your web pages.

You Have Score    /10