From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../html/global_attributes/itemscope/index.html | 320 --------------------- 1 file changed, 320 deletions(-) delete mode 100644 files/uk/web/html/global_attributes/itemscope/index.html (limited to 'files/uk/web/html/global_attributes/itemscope/index.html') diff --git a/files/uk/web/html/global_attributes/itemscope/index.html b/files/uk/web/html/global_attributes/itemscope/index.html deleted file mode 100644 index 2a1eb3e0a3..0000000000 --- a/files/uk/web/html/global_attributes/itemscope/index.html +++ /dev/null @@ -1,320 +0,0 @@ ---- -title: itemscope -slug: Web/HTML/Global_attributes/itemscope -translation_of: Web/HTML/Global_attributes/itemscope -original_slug: Web/HTML/Загальні_атрибути/itemscope ---- -
{{HTMLSidebar("Global_attributes")}}
- -

itemscope це глобальний атрибут логічного типу, що визначає сферу асоційованих даних. Атрибут itemscope визначається на елементах, що створюють нові елементи, який призводить до числа з пар назва-значення, що асоціюється з елементом. Пов'язаний з ним атрибут, {{htmlattrxref("itemtype")}}, використовується для визначення валідної URL зі словника (such as schema.org), що описує елемент та контекст його властивостей. У наступних прикладах в кожному елементі словник взятий з schema.org.

- -

Кожен HTML елемент може мати атрибут itemscope. itemscope елемент, який не має itemtype повинен мати itemref.

- -
-

Примітка: Знайти більше інформації про атрибут itemtype  можна на  http://schema.org/Thing

-
- -

Простий приклад

- -

HTML

- -

Нижченаведений приклад демонструє атрибут itemscope. В прикладі використовується itemtype як "http://schema.org/Movie", і три пов'язані атрибути 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>
-
- -

- -

Структуровані дані

- -

В наступній таблиці показано структуровані дані з попереднього прикладу.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
itemscopeItemtypeMovie
itemprop(itemprop name)(значення itemprop)
itempropdirectorJames Cameron
itempropgenreScience Fiction
itempropnameAvatar
itemprophttps://youtu.be/0AY1XIkX7bYTrailer
- -

itemscope id атрибути

- -

Коли ви використовуєте атрибут itemscope для елементу, створюється новий елемент. Новостворений елемент містить групу з пар ім'я-значення. For elements with an itemscope attribute and an itemtype attribute,  you may also specify an {{htmlattrxref("id")}} attribute. You can use the id attribute to set a global identifier for the new item. A global identifier allows the item to relate to other items found on pages across the Web.

- -

Приклад

- -

There are four itemscope attributes in the following example. Each itemscope attribute sets the scope of its corresponding itemptype attribute. The itemtypes, Recipe, AggregateRating, and NutritionInformation in the following example are part of the schema.org structured data for a recipe, as specified by the first 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> 
- -

Results

- -

HTML

- -

The following is an example rendering of the preceding code example.

- -

{{EmbedLiveSample('Example', '500', '550', '', 'Web/HTML/Global_attributes/itemscope')}}

- -

Structured data

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
itemscopeitemtypeRecipe
itempropnameGrandma's Holiday Apple Pie
itempropimagehttps://c1.staticflickr.com/1/30/42759561_8631e2f905_n.jpg
itempropdatePublished2009-11-05
itempropdescriptionThis is my grandmother's apple pie recipe. I like to add a dash of nutmeg.
itempropprepTimePT30M
itempropcookTimePT1H
itemproptotalTimePT1H30M
itemproprecipeYield1 9" pie (8 servings)
itemproprecipeIngredientThinly-sliced apples: 6 cups
itemproprecipeIngredientWhite sugar: 3/4 cup
itemproprecipeInstructions1. Cut and peel apples 2. Mix sugar and cinnamon. Use additional sugar for tart apples .
itempropauthor [Person]
itempropnameCarol Smith
itemscopeitemprop[itemtype]aggregateRating [AggregateRating]
itempropratingValue4.0
itempropreviewCount35
itemscopeitemprop[itemtype]nutrition [NutritionInformation]
itempropservingSize1 medium slice
itempropcalories250 cal
itempropfatContent12 g
- -
-

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

-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
itemscopeWG Note - No longer being actively developed
- -

Browser compatibility

- -

The following table details this feature's compatibility with popular browsers. 

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

See also

- - -- cgit v1.2.3-54-g00ecf