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
,采用
startDate
and location as
itemprop
's which
MusicEvent
defines.
注意:
More about
itemtype
attributes can be found at
http://schema.org/Thing
<div itemscope itemtype="http://schema.org/Product"> <span itemprop="brand">ACME</span> <span itemprop="name">Executive Anvil</span> </div>
| itemscope | itemtype | schema.org Product | |
| itemprop | 名称 | Executive Anvil | |
| itemprop | brand [Thing] | ||
| itemprop | 名称 | ACME | |
<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>
</div>
| itemscope | itemtype | Product (http://schema.org/Product) | |
| itemprop | 名称 | 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 | 名称 | 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 | 名称 | Executive Objects | |
注意 : A handy tool for extracting microdata structures from HTML is Google's Structured Data Testing Tool . Try it on the HTML shown above
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML Microdata
The definition of 'itemtype' in that specification. |
工作草案 | |
|
HTML 实时标准
The definition of 'itemprop' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemtype
|
Chrome 完整支持 Yes | Edge 完整支持 12 | Firefox 完整支持 Yes | IE 完整支持 Yes | Opera 完整支持 Yes | Safari 完整支持 Yes | WebView Android 完整支持 Yes | Chrome Android 完整支持 Yes | Firefox Android 完整支持 Yes | Opera Android 完整支持 Yes | Safari iOS 完整支持 Yes | Samsung Internet Android 完整支持 Yes |
完整支持
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<bgsound>
<big>
<blink>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<content>
<data>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir>
<div>
<dl>
<dt>
<element>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<image>
<img>
<input>
<ins>
<isindex>
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<listing>
<main>
<map>
<mark>
<marquee>
<menu>
<menuitem>
<meta>
<meter>
<multicol>
<nav>
<nextid>
<nobr>
<noembed>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<picture>
<plaintext>
<pre>
<progress>
<q>
<rb>
<rp>
<rt>
<rtc>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<shadow>
<slot>
<small>
<source>
<spacer>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<template>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
<xmp>
<input>
类型
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">