CSS Portal

HTML itemprop Global Attribute

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The itemprop attribute is part of the HTML Microdata specification and is used to define properties of structured data items. It helps describe the meaning of content on a webpage in a way that both humans and machines can understand, making it especially useful for search engines, SEO, and rich results.

The itemprop attribute is used together with other microdata attributes such as itemscope, itemtype, and itemid to create structured data that represents real-world entities like people, products, articles, events, and more.

What itemprop Does

The itemprop attribute assigns a name to a property of an item. That property can hold a value such as:

  • Text content
  • A URL
  • A number
  • A date or time
  • A nested item

Each itemprop belongs to the nearest parent element that has the itemscope attribute.

Using itemprop with itemscope and itemtype

To define a complete structured data item, itemprop is usually used inside an element with itemscope and itemtype.

<div itemscope itemtype="https://schema.org/Person">
  <span itemprop="name">Jane Smith</span>
  <span itemprop="jobTitle">Web Developer</span>
</div>

Here:

  • itemscope defines a new structured data item
  • itemtype specifies the schema type
  • itemprop defines properties belonging to that item

Common Use Cases

1. SEO and Search Engines

Search engines use itemprop data to better understand page content and may display enhanced search results such as:

  • Rich snippets
  • Knowledge panels
  • Product ratings
  • Event dates
2. Describing Structured Content

You can describe structured information such as:

  • Articles
  • Products
  • Reviews
  • Recipes
  • Organizations
  • People
3. Nesting Properties

itemprop can also define nested objects:

<div itemscope itemtype="https://schema.org/Person">
  <span itemprop="name">Alex Johnson</span>
  
  <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
    <span itemprop="addressLocality">Sydney</span>
    <span itemprop="addressCountry">Australia</span>
  </div>
</div>

Using itemprop with Meta Tags

You can also define values using <meta> elements when the data doesn’t need to be visible:

<meta itemprop="price" content="29.99">
<meta itemprop="priceCurrency" content="USD">

This is useful for machine-readable data that shouldn’t appear visually on the page.

Valid Values

The value of itemprop:

  • Must be a string
  • Should match a property defined by the vocabulary being used (commonly Schema.org)
  • Can contain multiple space-separated property names (less common but allowed)

Example:

<span itemprop="name alternateName">CSS Portal</span>

Relationship to Other Microdata Attributes

Attribute Purpose
itemscope Defines a new item
itemtype Specifies the type of item
itemprop Defines a property of an item
itemid Gives the item a unique identifier
itemref References properties located elsewhere in the document

Best Practices

  • Always use itemprop within an itemscope context
  • Use official schemas from schema.org when possible
  • Avoid inventing property names unless absolutely necessary
  • Keep structured data consistent with visible content
  • Use semantic HTML elements where possible for better clarity

Syntax

<span itemprop="name">John Doe</span>

Values

  • name

    Unlike standard HTML attributes (like type="checkbox"), itemprop does not have a fixed list of keywords. Instead, its values depend entirely on the itemtype you are using.

    The most common source for these values is Schema.org. Here are a few examples of properties based on specific types:

    Item Type (itemtype) Common Property Values (itemprop)
    Person name, jobTitle, address, birthDate, email
    Product name, brand, offers, aggregateRating, sku
    Event startDate, location, description, performer
    Recipe cookTime, recipeIngredient, recipeInstructions, calories

Example

<div itemscope itemtype="https://schema.org/Product">
<h2 itemprop="name">Wireless Headphones</h2>

<img
src="headphones.jpg"
alt="Wireless Headphones"
itemprop="image"
>

<p itemprop="description">
High-quality wireless headphones with noise cancellation.
</p>

<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<meta itemprop="priceCurrency" content="USD">
<span itemprop="price">99.99</span>
<link itemprop="availability" href="https://schema.org/InStock">
</div>
</div>

Browser Support

The following information will show you the current browser support for the HTML itemprop global attribute. Hover over a browser icon to see the version that first introduced support for this HTML global attribute.

This global attribute is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 27th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!