itemprop
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
<element itemscope itemtype="URL">
<element itemprop="property-name">Property Value</element>
</element>
Example
<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
andjobTitle
are properties that describe the person. This kind of structure is widely used for search engine optimization (SEO) and structured data purposes.
See Also
- Learn more about other global attributes.
- Explore more Microdata-related global attributes:
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.
itemid
The itemid attribute in HTML provides a unique identifier for an item within a structured data context like Microdata, associating it with an external reference or schema.
itemref
The itemref attribute in HTML associates an element with other elements that provide additional details about the item in Microdata, enhancing the context and the information available.