From daa1a2aff136fa9da1fcc97d7da97a2036fabc77 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:51:47 +0100 Subject: unslug uk: move --- .../web/html/global_attributes/hidden/index.html | 68 +++ files/uk/web/html/global_attributes/index.html | 474 +++++++++++++++++++++ .../html/global_attributes/itemscope/index.html | 319 ++++++++++++++ .../uk/web/html/global_attributes/lang/index.html | 90 ++++ .../web/html/global_attributes/tabindex/index.html | 96 +++++ 5 files changed, 1047 insertions(+) create mode 100644 files/uk/web/html/global_attributes/hidden/index.html create mode 100644 files/uk/web/html/global_attributes/index.html create mode 100644 files/uk/web/html/global_attributes/itemscope/index.html create mode 100644 files/uk/web/html/global_attributes/lang/index.html create mode 100644 files/uk/web/html/global_attributes/tabindex/index.html (limited to 'files/uk/web/html/global_attributes') diff --git a/files/uk/web/html/global_attributes/hidden/index.html b/files/uk/web/html/global_attributes/hidden/index.html new file mode 100644 index 0000000000..aadb167dcb --- /dev/null +++ b/files/uk/web/html/global_attributes/hidden/index.html @@ -0,0 +1,68 @@ +--- +title: hidden +slug: Web/HTML/Загальні_атрибути/hidden +tags: + - HTML + - Глобальні атрибути +translation_of: Web/HTML/Global_attributes/hidden +--- +
{{HTMLSidebar("Global_attributes")}}
+ +

Глобальний атрибут Hidden  - це булівський атрибут, який позначає,що цей елемент ще або вже не релевантний. Наприклад? цей атрибут може бути використаним, щоб сховати елементи поки не виконається вхід. Браузер не промалює елемент з заданим атрибутом hidden .

+ +
{{EmbedInteractiveExample("pages/tabbed/attribute-hidden.html","tabbed-shorter")}}
+ + + +

Атрибут hidden не має використовуватись для того, щоб  ховати контент, що має відображатись в іншому представленні. Наприклад, неправильно використовувати атрибут, щоб ховати панель в діалозі з вкладками, тому що інтерфейс вкладок - це  вид представлення зі схованими елементами, які можна відобразити  на одній великій сторінці з прокруткою. Так само не коректно використовувати вміст тільки для одного представлення - якщо щось позначено як приховане -  це має бути сховане для всіх представлень включно з зчитувачами екрана.

+ +

Сховані елементи не мають бути прив'язані до не схованих. і до елементів, які наслідують приховані, все ще активні елементи, що означає, що скриптові елементи все ще можуть виконуватися, а елементи форми відправлятися. Проте елементи і скрипти можуть посилатися на елементи, що сховані в іншому контексті.

+ +

Наприклад, неправильно використовувати атрибут href, що посилається до секції з атрибутом hidden. Немає сенсу посилатися на вміст якщо він не застосовуваний і не релевантний.

+ +

Проте було б добре використовувати  ARIA атрибут aria-describedby для посилання до описів, які сховані. Тоді як приховування описів означає, що вони не є корисними; Вони можуть бути написаними таким чином, щоб  бути корисними  в конкретному контексті посилання на них з елемента який вони описують.

+ +

Аналогічно елемент canvas з атрибутом hidden може бути використаний для заскриптованого графічного движка і форма може посилатися до схованого елемента використовуючи його атрибут форми.

+ +
+

Нотатка: Зміна {{cssxref("display")}} властивості  елемента з атрибутом hidden перезаписує середовище. Для прикладу, елемент стилізований display: flex буде відображатись, не зважаючи на атрибут hidden.

+
+ +

Специфікація

+ + + + + + + + + + + + + + + + + + + + + + + + +
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', "interaction.html#the-hidden-attribute", "hidden")}}{{Spec2('HTML WHATWG')}}Не змінювалося з останнього знымка, {{SpecName('HTML5.1')}}
{{SpecName('HTML WHATWG', "rendering.html#hiddenCSS", "Hidden elements")}}{{Spec2('HTML WHATWG')}}Визначає запропонований рендеринг атрибута hidden, використовуючи CSS
{{SpecName('HTML5.1', "editing.html#the-hidden-attribute", "hidden")}}{{Spec2('HTML5.1')}}Знімок {{SpecName('HTML WHATWG')}}, початкове визначення
+ +

Підтримка браузерів

+ + + +

{{Compat("html.global_attributes.hidden")}}

+ +

Дивіться також

+ + diff --git a/files/uk/web/html/global_attributes/index.html b/files/uk/web/html/global_attributes/index.html new file mode 100644 index 0000000000..224329d601 --- /dev/null +++ b/files/uk/web/html/global_attributes/index.html @@ -0,0 +1,474 @@ +--- +title: Загальні атрибути +slug: Web/HTML/Загальні_атрибути +translation_of: Web/HTML/Global_attributes +--- +
{{HTMLSidebar("Global_attributes")}}
+ +
+

Global attributes are attributes common to all HTML elements; they can be used on all elements, though the attributes may have no effect on some elements.

+
+ +

Global attributes may be specified on all HTML elements, even those not specified in the standard. That means that any non-standard elements must still permit these attributes, even though using those elements means that the document is no longer HTML5-compliant. For example, HTML5-compliant browsers hide content marked as <foo hidden>...<foo>, even though <foo> is not a valid HTML element.

+ +

In addition to the basic HTML global attributes, the following global attributes also exist:

+ + + +

Description

+ +
+
accesskey
+
Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout.
+
class
+
Is a space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method {{domxref("Document.getElementsByClassName()")}}.
+
contenteditable
+
Is an enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values: +
    +
  • true or the empty string, which indicates that the element must be editable;
  • +
  • false, which indicates that the element must not be editable.
  • +
+
+
contextmenu
+
Is the id of an {{HTMLElement("menu")}} to use as the contextual menu for this element.
+
data-*
+
Forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the HTML and its DOM representation that may be used by scripts. All such custom data are available via the {{domxref("HTMLElement")}} interface of the element the attribute is set on. The {{domxref("HTMLElement.dataset")}} property gives access to them.
+
dir
+
Is an enumerated attribute indicating the directionality of the element's text. It can have the following values: +
    +
  • ltr, which means left to right and is to be used for languages that are written from the left to the right (like English);
  • +
  • rtl, which means right to left and is to be used for languages that are written from the right to the left (like Arabic);
  • +
  • auto, which let the user agent decides. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then apply that directionality to the whole element.
  • +
+
+
draggable {{experimental_inline}}
+
Is an enumerated attribute indicating whether the element can be dragged, using the Drag and Drop API. It can have the following values: +
    +
  • true, which indicates that the element may be dragged
  • +
  • false, which indicates that the element may not be dragged.
  • +
+
+
dropzone {{experimental_inline}}
+
Is an enumerated attribute indicating what types of content can be dropped on an element, using the Drag and Drop API. It can have the following values: +
    +
  • copy, which indicates that dropping will create a copy of the element that was dragged
  • +
  • move, which indicates that the element that was dragged will be moved to this new location.
  • +
  • link, will create a link to the dragged data.
  • +
+
+
hidden
+
Is a Boolean attribute indicates that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown.
+
id
+
Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
+
+ +
+

Note: The following 5 attributes are part of the WHATWG HTML Microdata feature.

+
+ +
+
itemid {{experimental_inline}}
+
The unique, global identifier of an item.
+
itemprop {{experimental_inline}}
+
Used to add properties to an item. Every HTML element may have an itemprop attribute specified, where an itemprop consists of a name and value pair.
+
itemref {{experimental_inline}}
+
Properties that are not descendants of an element with the itemscope attribute can be associated with the item using an itemref. Itemref provides a list of element ids (not itemids) with additional properties elsewhere in the document.
+
itemscope {{experimental_inline}}
+
Itemscope (usually) works along with itemtype to specify that the HTML contained in a block is about a particular item. itemscope creates the Item and defines the scope of the itemtype associated with it. itemtype is a valid URL of a vocabulary (such as schema.org) that describes the item and its properties context.
+
itemtype {{experimental_inline}}
+
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.
+
lang
+
Participates in defining the language of the element, the language that non-editable elements are written in or the language that editable elements should be written in. The tag contains one single entry value in the format defines in the Tags for Identifying Languages (BCP47) IETF document. xml:lang has priority over it.
+
+ +
+
slot {{experimental_inline}}
+
Assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the {{HTMLElement("slot")}} element whose {{htmlattrxref("name", "slot")}} attribute's value matches that slot attribute's value.
+
+ +
+
spellcheck {{experimental_inline}}
+
Is an enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values: +
    +
  • true, which indicates that the element should be, if possible, checked for spelling errors;
  • +
  • false, which indicates that the element should not be checked for spelling errors.
  • +
+
+
style
+
Contains CSS styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the {{HTMLElement("style")}} element have mainly the purpose of allowing for quick styling, for example for testing purposes.
+
tabindex
+
Is an integer attribute indicating if the element can take input focus (is focusable), if it should participate to sequential keyboard navigation, and if so, at what position. It can takes several values: +
    +
  • a negative value means that the element should be focusable, but should not be reachable via sequential keyboard navigation;
  • +
  • 0 means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;
  • +
  • a positive value which means should be focusable and reachable via sequential keyboard navigation; its relative order is defined by the value of the attribute: the sequential follow the increasing number of the tabindex. If several elements share the same tabindex, their relative order follows their relative position in the document).
  • +
+
+
title
+
Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.
+
translate
+
Is an enumerated attribute that is used to specify whether an element's attribute values and the values of its {{domxref("Text")}} node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values: +
    +
  • empty string and "yes", which indicates that the element will be translated.
  • +
  • "no", which indicates that the element will not be translated.
  • +
+
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "dom.html#global-attributes", "Global attributes")}}{{Spec2('HTML WHATWG')}}From latest snapshot, {{SpecName('HTML5.1')}}, itemid, itemprop, itemref, itemscope, and itemtype have been added.
{{SpecName('HTML5.1', "dom.html#global-attributes", "Global attributes")}}{{Spec2('HTML5.1')}}Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName('HTML5 W3C')}}, spellcheck, draggable, and dropzone have been added.
{{SpecName('HTML5 W3C', "dom.html#global-attributes", "Global attributes")}}{{Spec2('HTML5 W3C')}}Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName("HTML4.01")}}, the concept of global attributes is introduced and the dir, lang, style, id, class, tabindex, accesskey, and title are now true global attributes.
+ xml:lang which was initially part of XHTML, is now also part of HTML.
+ hidden, data-*, contextmenu, contenteditable, and translate have been added.
{{SpecName('HTML4.01')}}{{Spec2('HTML4.01')}}There are no global attributes defined. Several attributes that will become global attributes in subsequent specifications are defined on a subset of elements.
+ class and style are supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, and {{HTMLElement("title")}}.
+ dir is supported on all elements but {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("bdo")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, and {{HTMLElement("script")}}.
+ id is supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, and {{HTMLElement("title")}}.
+ lang is supported on all elements but {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, and {{HTMLElement("script")}}.
+ tabindex is only supported on {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("object")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}}.
+ accesskey is only supported on {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("label")}}, {{HTMLElement("legend")}} and {{HTMLElement("textarea")}}.
+ title is supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, and {{HTMLElement("title")}}.
+ +

Browser compatibility

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
accesskey{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
class{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
contenteditable{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
contextmenu{{CompatNo}}{{CompatGeckoDesktop(9)}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
data-*{{CompatVersionUnknown}}{{CompatGeckoDesktop("6")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
dir{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
draggable{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
dropzone{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
hidden{{CompatVersionUnknown}}{{CompatGeckoDesktop("2")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
id{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
itemid, itemprop, itemref, itemscope, itemtype{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
lang{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
spellcheck{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
style{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
tabindex{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
title{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
accesskey{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
class{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
contenteditable{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.9")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
contextmenu{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
data-*{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("6")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
dir{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
draggable{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
dropzone{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
hidden{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
id{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
itemid, itemprop, itemref, itemscope, itemtype{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
lang{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
spellcheck{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
style{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
tabindex{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
title{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

See also

+ + diff --git a/files/uk/web/html/global_attributes/itemscope/index.html b/files/uk/web/html/global_attributes/itemscope/index.html new file mode 100644 index 0000000000..b170013be0 --- /dev/null +++ b/files/uk/web/html/global_attributes/itemscope/index.html @@ -0,0 +1,319 @@ +--- +title: itemscope +slug: Web/HTML/Загальні_атрибути/itemscope +translation_of: Web/HTML/Global_attributes/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

+ + diff --git a/files/uk/web/html/global_attributes/lang/index.html b/files/uk/web/html/global_attributes/lang/index.html new file mode 100644 index 0000000000..18fe252e78 --- /dev/null +++ b/files/uk/web/html/global_attributes/lang/index.html @@ -0,0 +1,90 @@ +--- +title: lang +slug: Web/HTML/Загальні_атрибути/lang +tags: + - HTML + - Довідка + - Загальні атрибути +translation_of: Web/HTML/Global_attributes/lang +--- +
{{HTMLSidebar("Global_attributes")}}
+ +

Загальний атрибут lang виозначує мову елемента: мову нередаговного вмісту або мову, якою користувач має писати в редаговних елементах (полях введення). Значення атрибута — один «тег мови» у форматі, визначеному стандартом Теги Ідентифікації Мов (BCP47).

+ +
{{EmbedInteractiveExample("pages/tabbed/attribute-lang.html","tabbed-shorter")}}
+ + + +

Якщо значенням атрибута є порожній рядок (lang=""), мова встановлюється як невідома; якщо тег мови несумісний із BCP47, мова встановлюється як недійсна.

+ +
+

Синтаксис тегу мови

+ +

Повний синтаксис BCP47 досить глибокий, щоб позначити надзвичайно специфічні мовні діалекти, але в більшості використання набагато простіше.

+ +

Тег мови складається з мов підтегів, розділених дефісом, де кожен підтег вказує на певну властивість мови. Три найпоширеніші підтеги:

+ +
+
Підтег мови
+
Обов'язковий. Код із 2 або 3 символів, який визначає основну мову, зазвичай написані у нижньому регістрі. Наприклад, код для англійської мови є en, а код для Бадеші є bdz.
+
Підтег сценарію
+
Необов'язково. Цей підтег визначає, яку систему запису використовувати для мови і завжди має довжину 4 символи, починається з великої літери. Наприклад, французька-шрифтом-Брайля буде fr-Brai, а ja-Kana це японська, що написана алфавітом Катакана. Якщо мова написана дуже типовим способом, як англійська латинським алфавітом, немає необхідності використовувати цей підтег.
+
Підтег регіону/області
+
Необов'язково. Цей підтег визначає діалект базової мови із певного місця розташування, і це або 2 ВЕЛИКІ літери, що відповідають коду країни, або 3 номери, що відповідають регіону без конкретної країни. Наприклад, es-ES це іспанська, якою говорять в Іспанії, а es-013 це іспанська мова в Центральній Америці. “Міжнародний іспанський” просто буде es.
+
+ +

Підтег скрипта передує підтегу регіону, якщо вони обидва присутні — ru-Cyrl-BY це російська, написана кирилицею, якою говорять в Білорусі.

+ +

Щоб знайти правильні коди підтегу для мови, спробуйте Пошук Підтегу Мови.

+
+ +

Навіть якщо атрибут lang зазначено, його значення може бути знехтувано, бо атрибут xml:lang має пріоритет.

+ +

Для псевдо-класу CSS {{cssxref(":lang")}}, дві недійсні (invalid) назви мов є різні, якщо їхні імена відрізняються. Таким чином, :lang(es) відповідає обом lang="es-ES" і lang="es-419", :lang(xyzzy) не відповідатиме lang="xyzzy-Zorp!".

+ +

Специфікації

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
СпецифікаціяСтатусКоментар
{{SpecName('HTML WHATWG', "dom.html#the-lang-and-xml:lang-attributes", "lang")}}{{Spec2('HTML WHATWG')}}Немає змін від останнього знімку, {{SpecName('HTML5.1')}}
{{SpecName('HTML5.1', "dom.html#the-lang-and-xml:lang-attributes", "lang")}}{{Spec2('HTML5.1')}}Знімок {{SpecName('HTML WHATWG')}}, без змін {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', "dom.html#the-lang-and-xml:lang-attributes", "lang")}}{{Spec2('HTML5 W3C')}}Знімок {{SpecName('HTML WHATWG')}}, поведінка з xml:lang та певний алгоритм визначення мови. Він також є справжнім глобальним атрибутом.
{{SpecName('HTML4.01', 'struct/dirlang.html#h-8.1', 'lang')}}{{Spec2('HTML4.01')}}Підтримується у всіх елементах, крім {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, та {{HTMLElement("script")}}.
+ +

Підтримка веб-переглядачами

+ + + +

{{Compat("html.global_attributes.lang")}}

+ +

Див. також

+ + diff --git a/files/uk/web/html/global_attributes/tabindex/index.html b/files/uk/web/html/global_attributes/tabindex/index.html new file mode 100644 index 0000000000..a081d178c2 --- /dev/null +++ b/files/uk/web/html/global_attributes/tabindex/index.html @@ -0,0 +1,96 @@ +--- +title: tabindex +slug: Web/HTML/Загальні_атрибути/tabindex +tags: + - HTML + - Tab + - keyboard + - tabIndex + - Глобальні атрибути + - клавіатура +translation_of: Web/HTML/Global_attributes/tabindex +--- +
{{HTMLSidebar("Global_attributes")}}
+ +

tabindex глобальний атрибут вказує, що його елемент може бути сфокусований, і коли саме він бере участь в послідовності навігації за допомогою клавіатури (зазвичай за допомогою клавіші Tab , звідти і назва).

+ +
{{EmbedInteractiveExample("pages/tabbed/attribute-tabindex.html","tabbed-standard")}}
+ + + +

Він приймає в якості значення ціле позитивне або негативне число з різними наслідками в залежності від величини цого числа:

+ + + +

Якщо ви встановите атрибут tabindex з {{htmlelement("div")}}, то його нащадки не зможуть бути прокручені за допомогою клавіш клавіатури зі стрілками, якщо тільки ви не встановите tabindex на вміст також. Ознайомтеся з цією статтею, щоб зрозуміти ефект від tabindex.

+ +

Вимоги доступності

+ +

Уникайте використання атрибута tabindex в поєднанні з не-інтерактивним вмістом , щоб зробити щось, призначене для інтерактивної фокусування при введенні з клавіатури. Прикладом цього може служити використання елемента {{HTMLElement ("div")}} для опису кнопки, а не елементу {{HTMLElement ("button")}}.

+ +

Інтерактивні компоненти, створені з використанням неінтерактивних елементів, у дереві доступності не відображаються. Це не дозволяє допоміжним технологіям керувати і маніпулювати цими компонентами. Вміст має бути описано семантично з використанням інтерактивних елементів ({{HTMLElement ("a")}}, {{HTMLElement ("button")}}, {{HTMLElement ("details")}}, {{HTMLElement ("input" )}}, {{HTMLElement ("select")}}, {{HTMLElement ("textarea")}}, і т.д.) і т.п.). Ці елементи мають вбудовані ролі і стани, що передають статус доступності. В іншому випадку ці компоненти повинні управлятися за допомогою ARIA.

+ + + +

Специфікації

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "interaction.html#attr-tabindex", "tabindex")}}{{Spec2('HTML WHATWG')}}Ніяких змін порівняно з останнім snapshot, {{SpecName('HTML5.1')}}.
{{SpecName('HTML5.1', "editing.html#the-tabindex-attribute", "tabindex")}}{{Spec2('HTML5.1')}}Snapshot of {{SpecName('HTML WHATWG')}}, без змін від {{SpecName('HTML5 W3C')}}.
{{SpecName('HTML5 W3C', "editing.html#attr-tabindex", "tabindex")}}{{Spec2('HTML5 W3C')}}Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName("HTML4.01")}}, атрибут наразі підтримується на всіх елементах  (global attributes).
{{SpecName('HTML4.01', 'interact/forms.html#adef-tabindex', 'tabindex')}}{{Spec2('HTML4.01')}}Підтримується лише на {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("object")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}}.
+ +

Сумісність з браузерами

+ + + +

{{Compat("html.global_attributes.tabindex")}}

+ +

Подивіться також

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