1.

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 scopeThe question was asked in an online quiz.My doubt is from Microdata topic in portion HTML Fundamentals of HTML

Answer»

The correct choice is (a) The value is the value of the ELEMENT’s value ATTRIBUTE if it has one, or the empty string otherwise

To elaborate: 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.



Discussion

No Comment Found

Related InterviewSolutions