From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/global_attributes%2Fitemtype.html | 117 +++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 devdocs/html/global_attributes%2Fitemtype.html (limited to 'devdocs/html/global_attributes%2Fitemtype.html') diff --git a/devdocs/html/global_attributes%2Fitemtype.html b/devdocs/html/global_attributes%2Fitemtype.html new file mode 100644 index 00000000..545af42d --- /dev/null +++ b/devdocs/html/global_attributes%2Fitemtype.html @@ -0,0 +1,117 @@ +

itemtype

+

The global attribute itemtype specifies the URL of the vocabulary that will be used to define itemprop's (item properties) in the data structure.

itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active.

Google and other major search engines support the schema.org vocabulary for structured data. This vocabulary defines a standard set of type names and property names. For example, MusicEvent indicates a concert performance, with startDate and location properties specifying the concert's key details. In this case, MusicEvent would be the URL used by itemtype, with startDate and location as itemprop's which MusicEvent defines.

Note: More about itemtype attributes can be found at https://schema.org/Thing

+
+

Examples

+ +

Representing structured data for a product

+
+

This example uses microdata attributes to represent structured data for a product, as follows:

itemscope itemtype Product (http://schema.org/Product)
itemprop name Executive Anvil
itemprop image https://pixabay.com/static/uploads/photo/2015/09/05/18/15/suitcase-924605_960_720.png
itemprop description Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.
itemprop mpn 925872
itemprop brand [Thing]
itemprop name ACME
itemscope itemprop[itemtype] aggregateRating[AggregateRating]
itemprop ratingValue 4.4
itemprop reviewCount 89
itemprop offers [Offer] http://schema.org/Offer
itemprop priceCurrency USD
itemprop price 119.99
itemprop priceValidUntil 2020-11-05
itemprop itemCondition http://schema.org/UsedCondition
itemprop availability http://schema.org/InStock
itemscope itemprop[itemtype] seller [Organization] http://schema.org/Organization
itemprop name Executive Objects

Note: A handy tool for extracting microdata structures from HTML is Google's Structured Data Testing Tool. Try it on the HTML shown here.

HTML

+

html

+
<div itemscope itemtype="http://schema.org/Product">
+  <span itemprop="brand">ACME<br /></span>
+  <span itemprop="name">Executive Anvil<br /></span>
+  <img
+    itemprop="image"
+    src="https://pixabay.com/static/uploads/photo/2015/09/05/18/15/suitcase-924605_960_720.png"
+    width="50"
+    height="50"
+    alt="Executive Anvil logo" /><br />
+
+  <span itemprop="description">
+    Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the
+    business traveler looking for something to drop from a height.
+    <br />
+  </span>
+
+  Product #: <span itemprop="mpn">925872<br /></span>
+  <span
+    itemprop="aggregateRating"
+    itemscope
+    itemtype="http://schema.org/AggregateRating">
+    Rating: <span itemprop="ratingValue">4.4</span> stars, based on
+    <span itemprop="reviewCount">89 </span> reviews
+  </span>
+  <p>
+    <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+      Regular price: $179.99<br />
+      <meta itemprop="priceCurrency" content="USD" />
+      <span itemprop="price">Sale price: $119.99<br /></span>
+      (Sale ends
+      <time itemprop="priceValidUntil" datetime="2020-11-05">5 November!</time>)
+      <br />
+      Available from:
+      <span
+        itemprop="seller"
+        itemscope
+        itemtype="http://schema.org/Organization">
+        <span itemprop="name">Executive Objects<br /></span>
+      </span>
+      Condition:
+      <link
+        itemprop="itemCondition"
+        href="http://schema.org/UsedCondition" />Previously owned, in excellent
+      condition<br />
+      <link itemprop="availability" href="http://schema.org/InStock" />In stock!
+      Order now!
+    </span>
+  </p>
+</div>
+
+

Result

+
+ + +
+
+

Specifications

+
+ + +
Specification
HTML Standard
# attr-itemtype
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
itemtypeYes12YesYesYesYesYesYesYesYesYesYes
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemtype +

+
-- cgit v1.2.3