亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" 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" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
characters

itemscope是定義關(guān)聯(lián)元數(shù)據(jù)范圍的Boolean全局屬性。指定itemscope元素的屬性會創(chuàng)建一個新項目,這會生成一些與元素關(guān)聯(lián)的名稱 - 值對。相關(guān)屬性,itemtype用于指定描述項目及其屬性上下文的詞匯表(例如schema.org)的有效URL 。在以下每個示例中,詞匯均來自schema.org。

每個HTML元素可能都有一個itemscope指定的屬性。itemscope沒有關(guān)聯(lián)的元素itemtype必須具有關(guān)聯(lián)的元素itemref。

注意:在http://schema.org/Thing找到更多關(guān)于itemtype屬性的信息

簡單的例子

HTML

以下示例指定itemscope屬性。示例指定itemtype為“ http://schema.org/Movie ”,并指定三個相關(guān)的itemprop屬性。

<div itemscope itemtype ="http://schema.org/Movie">  <h1 itemprop="name">Avatar</h1>  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>  <span itemprop="genre">Science fiction</span>  <a href="https://youtu.be/0AY1XIkX7bY" itemprop="trailer">Trailer</a></div>

結(jié)構(gòu)化數(shù)據(jù)

下表顯示了上例中的結(jié)構(gòu)化數(shù)據(jù)。

itemscope

Itemtype

Movie

itemprop

(itemprop name)

(itemprop value)

itemprop

director

James Cameron

itemprop

genre

Science Fiction

itemprop

name

Avatar

itemprop

https://youtu.be/0AY1XIkX7bY

Trailer

itemscope ID屬性

當您為元素itemscope指定屬性時,會創(chuàng)建一個新項目。項目由一組名稱 - 值對組成。對于具有itemscope屬性和itemtype屬性的元素,您還可以指定id屬性。您可以使用id屬性為新項目設置全局標識符。全局標識符允許項目與遍及Web頁面上的其他項目相關(guān)聯(lián)。

itemscope在以下示例中有四個屬性。每個itemscope屬性設置其相應itemptype屬性的范圍。itemtypeS, ,Recipe,AggregateRatingNutritionInformation在下面的例子是部分schema.org用于配方的結(jié)構(gòu)化數(shù)據(jù),由所述itemptype首先指定,http://schema.org/Recipe。

<div itemscope itemtype="http://schema.org/Recipe"><h2 itemprop="name">Grandma's Holiday Apple Pie</h2><img itemprop="image" src="https://c1.staticflickr.com/1/30/42759561_8631e2f905_n.jpg" width="50" height="50"/><p>By <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Carol Smith</p></span></span> <p>Published: <time datetime="2009-11-05" itemprop="datePublished">November 5, 2009</p></time><span itemprop="description">This is my grandmother's apple pie recipe. I like to add a dash of nutmeg.<br></span> <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">4.0</span> stars based on <span itemprop="reviewCount">35</span> reviews<br></span> Prep time: <time datetime="PT30M" itemprop="prepTime">30 min<br></time>
 Cook time: <time datetime="PT1H" itemprop="cookTime">1 hour<br></time>
 Total time: <time datetime="PT1H30M" itemprop="totalTime">1 hour 30 min<br></time>
 Yield: <span itemprop="recipeYield">1 9" pie (8 servings)<br></span> <span itemprop="nutrition" itemscope itemtype="http://schema.org/NutritionInformation">
 Serving size: <span itemprop="servingSize">1 medium slice<br></span>
 Calories per serving: <span itemprop="calories">250 cal<br></span>
 Fat per serving: <span itemprop="fatContent">12 g<br></span> </span> <p>Ingredients:<br>  <span itemprop="recipeIngredient">Thinly-sliced apples: 6 cups<br></span>  <span itemprop="recipeIngredient">White sugar: 3/4 cup<br></span> ... </p>Directions: <br>  <div itemprop="recipeInstructions"> 
    1. Cut and peel apples<br> 
    2. Mix sugar and cinnamon. Use additional sugar for tart apples. <br>    ... 
  </div> </div>

結(jié)果

HTML

以下是前面的代碼示例的呈現(xiàn)。

結(jié)構(gòu)化數(shù)據(jù)

itemscope

itemtype

Recipe

itemprop

name

Grandma's Holiday Apple Pie

itemprop

image

https://c1.staticflickr.com/1/30/42759561_8631e2f905_n.jpg

itemprop

datePublished

2009-11-05

itemprop

description

This is my grandmother's apple pie recipe. I like to add a dash of nutmeg.

itemprop

prepTime

PT30M

itemprop

cookTime

PT1H

itemprop

totalTime

PT1H30M

itemprop

recipeYield

1 9" pie (8 servings)

itemprop

recipeIngredient

Thinly-sliced apples: 6 cups

itemprop

recipeIngredient

White sugar: 3/4 cup

itemprop

recipeInstructions

  1. Cut and peel apples 2. Mix sugar and cinnamon. Use additional sugar for tart apples .

itemprop

author Person


itemprop

name

Carol Smith

itemscope

itempropitemtype

aggregateRating AggregateRating

itemprop

ratingValue

4.0

itemprop

reviewCount

35

itemscope

itempropitemtype

nutrition NutritionInformation

itemprop

servingSize

1 medium slice

itemprop

calories

250 cal

itemprop

fatContent

12 g

注意:用于從HTML中提取微數(shù)據(jù)結(jié)構(gòu)的便捷工具是Google的結(jié)構(gòu)化數(shù)據(jù)測試工具。試試上面顯示的HTML。

規(guī)格

Specification

Status

Comment

itemscope


WG Note - No longer being actively developed

瀏覽器兼容性

下表詳細介紹了功能與常用瀏覽器的兼容性。

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Previous article: Next article: