itemprop

The itemprop attribute in HTML is used to define properties within a structured data format (Microdata), offering more context about an item for search engines and other applications.

itemprop Attribute

The itemprop attribute is used to assign specific properties to elements, such as names, URLs, or other descriptors, within a structured data context like Microdata. This attribute helps search engines better understand the content of a page.

Purpose: Enhances structured data with property-value pairs.
Usage: Can be applied to various HTML elements, with values that may either be text strings or URLs.

Syntax

index.html
<element itemscope itemtype="URL">
  <element itemprop="property-name">Property Value</element>
</element>

Example

Jane Doe

Web Developer

123 Main St, Anytown, USA

[email protected]

(123) 456-7890

index.html
<div itemscope itemtype="http://schema.org/Person">
  <div class="name">Jane Doe</div>
  <p itemprop="jobTitle">Web Developer</p>
  <p itemprop="address">123 Main St, Anytown, USA</p>
  <p itemprop="email">[email protected]</p>
  <p itemprop="telephone">(123) 456-7890</p>
</div>
  • In this example, name and jobTitle are properties that describe the person. This kind of structure is widely used for search engine optimization (SEO) and structured data purposes.

See Also

Conclusion

The itemprop attribute is used to define specific properties of an item within structured data, improving the understanding of content by search engines. It works in conjunction with the itemscope and itemtype attributes to provide context for elements like names, addresses, and job titles. This attribute plays a vital role in enhancing SEO and enabling more accurate data interpretation.