VOOZH about

URL: https://www.geeksforgeeks.org/html/html-itemscope-attribute/

⇱ HTML itemscope Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML itemscope Attribute

Last Updated : 23 Jul, 2025

The HTML itemscope attribute works with item types to ensure that the HTML contained in a block is about a particular item.  Defining the itemscope attribute for any element creates a new item, which results in a number of name-value pairs that are associated with the element.

Syntax:

<element itemscope></element>

Example 1: The below example illustrates the itemscope attribute in HTML.

Output:

👁 Image

Structured data: The following table shows the structured data from the preceding example.

itemscope

itemtype

channel

itemprop

(itemprop name)

(itemprop value)

itemprop

topic

A Computer

itemprop

stack

Web Developer

itemprop

name

Courses

itemprop

full_course

Visit Courses

Example 2: In this example we displays a webpage featuring GeeksforGeeks content with microdata. It includes a section for DSA courses, utilizing itemscope and itemprop to define structured data properties like course name, topics, and links.

Output:

👁 Image

Structured data: The following table shows the structured data from the preceding example.

itemscope

itemtype

channel

itemprop

(itemprop name)

(itemprop value)

itemprop

topic

A Computer

itemprop

stack

Competitive Programming

itemprop

name

Courses

itemprop

full_course

Visit Courses

itemprop

stack

DataStructure & Algorithm

itemprop

course

Visit Courses

Supported Browsers:

Comment
Article Tags:
Article Tags: