- Courses
- HTML
- HTML top level tags
- <meta>
- Use of itemprop attribute in meta
How is the itemprop
attribute used in the <meta>
element?
The itemprop attribute in the <meta>
element is used to add custom metadata for structured data.
It is part of the microdata specification, allowing developers to embed custom metadata within HTML documents. This metadata can be used by search engines to better understand the content of the page, enhancing search results with rich snippets.
<span itemscope>
<meta itemprop="name" content="The Castle" />
</span>
<figure>
<img src="castle.jpeg" />
<figcaption>The Castle (1986)</figcaption>
</figure>