H

Harikesh • 8.04K Points
Tutor III

Q. Every HTML element may have an ____________ attribute specified.

  • (A) itemtype
  • (B) relevant types
  • (C) itemscope
  • (D) none of the mentioned
  • Correct Answer - Option(C)
  • Views: 220
  • Filed under category HTML

Explanation by: Official MCQ Buddy

In HTML5, the itemscope attribute is used in Microdata API to define that an element and its children contain metadata for a specific item.

  • It is a global attribute, meaning it can be used on any HTML element.
  • itemscope is often used with itemtype to specify what type of item is being described.

Example:

<div itemscope itemtype="https://schema.org/Person">
  <span itemprop="name">John Doe</span>
</div>

Here, the div element defines a microdata item using itemscope, and itemtype specifies that it follows Schema.org's Person type.

Why Other Options Are Incorrect?

  • (A) itemtype
    • itemtype is used to specify the type of item but must be used with itemscope, so it's not universally applicable to every HTML element.
  • (B) relevant types
    • No such attribute exists in HTML.
  • (D) none of the mentioned
    • itemscope is a global attribute, so this option is incorrect.

Final Answer:

(C) itemscope

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics