aboutsummaryrefslogtreecommitdiff
path: root/files/uk/web/html/element/section/index.html
blob: 5b0123416184e6e78c68560189608829108e1ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
title: <section>
slug: Web/HTML/Елемент/section
tags:
  - HTML
  - HTML секції
  - Ве
  - Елемент
  - Посилання
translation_of: Web/HTML/Element/section
---
<p>{{HTMLRef}}</p>

<p><strong>HTML елемент <code>&lt;section&gt;</code></strong> являє собою узагальнену секцію документу, яка допомагає категоризувати контент, зазвичай, заголовком. Кожний елемент <code>&lt;section&gt;</code> повинен бути ідентифікований, зазвичай, використанням заголовків ({{HTMLElement('h1')}}-{{HTMLElement('h6')}} element) в якості дочірнього елементу <code>&lt;section&gt;</code>.</p>

<div class="note">
<p><em>Зауваження щодо використання :</em></p>

<ul>
 <li>Якщо є доцільним розбивати на категорії контент у елементі {{HTMLElement("section")}} , то використовуйте замість нього елемент {{HTMLElement("article")}}.</li>
 <li>Не використовуйте елемент {{HTMLElement("section")}} як загальний контейнер; цю функцію виконує елемент {{HTMLElement("div")}}, особливо тоді, коли секціонування призначено для стилізації. Емпіричне правило використання цього елементу полягає у тому, що розділ повинен логічно відображатись у контурі документу</li>
</ul>
</div>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/uk/docs/Web/HTML/Content_categories">Content categories</a></th>
   <td><a href="/uk/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>, <a href="/uk/docs/Web/HTML/Content_categories#Sectioning_content">Sectioning content</a>, palpable content.</td>
  </tr>
  <tr>
   <th scope="row">Permitted content</th>
   <td><a href="/uk/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>.</td>
  </tr>
  <tr>
   <th scope="row">Tag omission</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">Permitted parent elements</th>
   <td>Any element that accepts <a href="/uk/docs/Web/HTML/Content_categories#Flow_content">flow content</a>. Note that a {{HTMLElement("section")}} element must not be a descendant of an {{HTMLElement("address")}} element.</td>
  </tr>
  <tr>
   <th scope="row">DOM interface</th>
   <td>{{domxref("HTMLElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Атрибути">Атрибути</h2>

<p>Цей елемент може включати в себе лише глобальні атрибути.</p>

<h2 id="Приклад_1">Приклад 1</h2>

<h3 id="До">До</h3>

<pre>&lt;div&gt;
  &lt;h1&gt;Heading&lt;/h1&gt;
  &lt;p&gt;Bunch of awesome content&lt;/p&gt;
&lt;/div&gt;</pre>

<h3 id="Після">Після</h3>

<pre class="brush: html">&lt;section&gt;
  &lt;h1&gt;Heading&lt;/h1&gt;
  &lt;p&gt;Bunch of awesome content&lt;/p&gt;
&lt;/section&gt;
</pre>

<h2 id="Приклад_2">Приклад 2</h2>

<h3 id="До_2">До</h3>

<pre class="brush: html">&lt;div&gt;
  &lt;h2&gt;Heading&lt;/h2&gt;
  &lt;img src="bird.jpg" alt="bird"&gt;
&lt;/div&gt;
</pre>

<h3 id="Після_2">Після</h3>

<pre class="brush: html">&lt;section&gt;
  &lt;h2&gt;Heading&lt;/h2&gt;
  &lt;img src="bird.jpg" alt="bird"&gt;
&lt;/section&gt;
</pre>

<h2 id="Специфікації">Специфікації</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comments</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'sections.html#the-section-element', '&lt;section&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5.1', 'sections.html#the-section-element', '&lt;section&gt;')}}</td>
   <td>{{Spec2('HTML5.1')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'sections.html#the-section-element', '&lt;section&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Підтримка_веб-переглядачами">Підтримка веб-переглядачами</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>5</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>9.0</td>
   <td>11.10</td>
   <td>4.1</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>2.2</td>
   <td>{{CompatGeckoMobile("2.0")}}</td>
   <td>9.0</td>
   <td>11.0</td>
   <td>5.0 (iOS 4.2)</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="Див._також">Див. також</h2>

<ul>
 <li>Other section-related elements: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};</li>
 <li><a href="/uk/docs/Sections_and_Outlines_of_an_HTML5_document">Sections and outlines of an HTML5 document</a>.</li>
</ul>