πŸ“Š HTML
Q. Every HTML element may have an ____________ attribute specified.
  • (A) itemtype
  • (B) relevant types
  • (C) itemscope
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) itemscope

Explanation:

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
291
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Harikesh
Publisher
πŸ“ˆ
93%
Success Rate