diff --git a/2-ui/1-document/03-dom-navigation/1-dom-children/solution.md b/2-ui/1-document/03-dom-navigation/1-dom-children/solution.md
index decfa62c7..3c990e62a 100644
--- a/2-ui/1-document/03-dom-navigation/1-dom-children/solution.md
+++ b/2-ui/1-document/03-dom-navigation/1-dom-children/solution.md
@@ -1,27 +1,27 @@
-There are many ways, for instance:
+Існує багато способів, наприклад:
-The `
` DOM node:
+До DOM вузла `
`:
```js
document.body.firstElementChild
-// or
+// або
document.body.children[0]
-// or (the first node is space, so we take 2nd)
+// або (перший вузол -- це пробіл, тому беремо 2-й)
document.body.childNodes[1]
```
-The `
` DOM node:
+До DOM вузла `
`:
```js
document.body.lastElementChild
-// or
+// або
document.body.children[1]
```
-The second `
` (with Pete):
+До другого `
` (Петро):
```js
-// get
, and then get its last element child
+// отримати
, а потім отримати його останній дочірній елемент
document.body.lastElementChild.lastElementChild
```
diff --git a/2-ui/1-document/03-dom-navigation/1-dom-children/task.md b/2-ui/1-document/03-dom-navigation/1-dom-children/task.md
index d97f2748a..5861acf01 100644
--- a/2-ui/1-document/03-dom-navigation/1-dom-children/task.md
+++ b/2-ui/1-document/03-dom-navigation/1-dom-children/task.md
@@ -2,23 +2,23 @@ importance: 5
---
-# DOM children
+# Діти у DOM
-Look at this page:
+Подивіться на цю сторінку:
```html
-
Users:
+
Користувачи:
-
John
-
Pete
+
Іван
+
Петро
```
-For each of the following, give at least one way of how to access them:
-- The `
` DOM node?
-- The `
` DOM node?
-- The second `
` (with Pete)?
+Вкажіть принаймні один спосіб доступу до кожного з перелічених нижче DOM вузлів:
+- До DOM вузла `
`?
+- До DOM вузла `
`?
+- До другого `
` (Петро)?
diff --git a/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md b/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md
index d76936320..ffe56b046 100644
--- a/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md
+++ b/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md
@@ -1,6 +1,6 @@
-1. Yes, true. The element `elem.lastChild` is always the last one, it has no `nextSibling`.
-2. No, wrong, because `elem.children[0]` is the first child *among elements*. But there may exist non-element nodes before it. So `previousSibling` may be a text node.
+1. Так, це правда. Елемент `elem.lastChild` завжди останній, у нього немає `nextSibling`.
+2. Ні, це неправда, тому що `elem.children[0]` — перший дочірній *серед елементів*. Але перед ним можуть існувати вузли інших типів. Отже, `previousSibling` може бути, наприклад, текстовим вузлом.
-Please note: for both cases if there are no children, then there will be an error.
+Зверніть увагу: в обох випадках якщо немає дітей, то буде помилка.
-If there are no children, `elem.lastChild` is `null`, so we can't access `elem.lastChild.nextSibling`. And the collection `elem.children` is empty (like an empty array `[]`).
+Якщо дочірніх елементів немає, `elem.lastChild` матиме значення `null`, тому ми не зможемо отримати доступ до `elem.lastChild.nextSibling`. А колекція `elem.children` порожня (як порожній масив `[]`).
diff --git a/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md b/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md
index 235e83a0c..c321f13a2 100644
--- a/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md
+++ b/2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md
@@ -2,9 +2,9 @@ importance: 5
---
-# The sibling question
+# Питання про сусідів
-If `elem` -- is an arbitrary DOM element node...
+Якщо `elem` -- це довільний DOM елемент...
-- Is it true that `elem.lastChild.nextSibling` is always `null`?
-- Is it true that `elem.children[0].previousSibling` is always `null` ?
+- Чи правда що `elem.lastChild.nextSibling` завжди `null`?
+- Чи правда що `elem.children[0].previousSibling` завжди `null`?
diff --git a/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/solution.md b/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/solution.md
index f2aa86302..787a60412 100644
--- a/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/solution.md
+++ b/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/solution.md
@@ -1 +1 @@
-We'll be using `rows` and `cells` properties to access diagonal table cells.
+Ми будемо використовувати властивості `rows` та `cells` для доступу до діагональних клітинок таблиці.
diff --git a/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md b/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md
index 23be59fc1..a12ec5085 100644
--- a/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md
+++ b/2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md
@@ -2,17 +2,17 @@ importance: 5
---
-# Select all diagonal cells
+# Виділіть усі діагональні клітинки
-Write the code to paint all diagonal table cells in red.
+Напишіть код, щоб зафарбувати всі діагональні клітинки таблиці червоним кольором.
-You'll need to get all diagonal `
` from the `
` and paint them using the code:
+Вам потрібно буде отримати всі діагоналі `
` з `
` і розфарбувати їх за допомогою коду:
```js
-// td should be the reference to the table cell
+// у td має бути посилання на клітинку таблиці
td.style.backgroundColor = 'red';
```
-The result should be:
+Результат повинен бути таким:
[iframe src="solution" height=180]
diff --git a/2-ui/1-document/03-dom-navigation/article.md b/2-ui/1-document/03-dom-navigation/article.md
index b5f03098c..130bd027b 100644
--- a/2-ui/1-document/03-dom-navigation/article.md
+++ b/2-ui/1-document/03-dom-navigation/article.md
@@ -5,37 +5,37 @@ libs:
---
-# Walking the DOM
+# Навігація по DOM
-The DOM allows us to do anything with elements and their contents, but first we need to reach the corresponding DOM object.
+DOM дозволяє нам робити будь-що з елементами та їх вмістом, але спочатку нам потрібно знайти відповідний DOM об’єкт.
-All operations on the DOM start with the `document` object. That's the main "entry point" to DOM. From it we can access any node.
+Усі операції з DOM починаються з об’єкта `document`. Це головна "точка входу" в DOM. З нього ми можемо отримати доступ до будь-якого вузла.
-Here's a picture of links that allow for travel between DOM nodes:
+Ось зображення структури посилань, які дозволяють переміщатися між вузлами DOM:

-Let's discuss them in more detail.
+Обговоримо їх більш детально.
-## On top: documentElement and body
+## Зверху: documentElement і body
-The topmost tree nodes are available directly as `document` properties:
+Найвищі вузли дерева доступні безпосередньо як властивості `document`:
`` = `document.documentElement`
-: The topmost document node is `document.documentElement`. That's the DOM node of the `` tag.
+: Найвищий вузол документа -- `document.documentElement`. Це вузол DOM тегу ``.
`` = `document.body`
-: Another widely used DOM node is the `` element -- `document.body`.
+: Для доступу до DOM вузлу `` часто використовують елемент -- `document.body`.
`` = `document.head`
-: The `` tag is available as `document.head`.
+: Тег `` доступний як `document.head`.
-````warn header="There's a catch: `document.body` can be `null`"
-A script cannot access an element that doesn't exist at the moment of running.
+````warn header="Але є загвоздка: `document.body` може бути `null`"
+Скрипт не може отримати доступ до елемента, який не існує на момент виконання цього скрипта.
-In particular, if a script is inside ``, then `document.body` is unavailable, because the browser did not read it yet.
+Зокрема, якщо скрипт знаходиться всередині ``, то `document.body` недоступний, оскільки браузер ще не прочитав його.
-So, in the example below the first `alert` shows `null`:
+Отже, у прикладі нижче перший `alert` виведе `null`:
```html run
@@ -43,7 +43,7 @@ So, in the example below the first `alert` shows `null`:
@@ -51,7 +51,7 @@ So, in the example below the first `alert` shows `null`:
@@ -59,18 +59,18 @@ So, in the example below the first `alert` shows `null`:
```
````
-```smart header="In the DOM world `null` means \"doesn't exist\""
-In the DOM, the `null` value means "doesn't exist" or "no such node".
+```smart header="У світі DOM `null` означає \"не існує\""
+У DOM значення `null` означає "не існує" або "такого вузла немає".
```
-## Children: childNodes, firstChild, lastChild
+## Дочірні елементи: childNodes, firstChild, lastChild
-There are two terms that we'll use from now on:
+Відтепер ми будемо використовувати два терміни:
-- **Child nodes (or children)** -- elements that are direct children. In other words, they are nested exactly in the given one. For instance, `` and `` are children of `` element.
-- **Descendants** -- all elements that are nested in the given one, including children, their children and so on.
+- **Дочірні вузли (або діти)** -- елементи, які є безпосередніми дітьми. Іншими словами, вони вкладені саме в цей вузол. Наприклад, `` і `` є дочірніми елементами ``.
+- **Нащадки** -- всі елементи, які вкладені в даний, включаючи дітей, їхніх дітей тощо.
-For instance, here `` has children `
` and `
` (and few blank text nodes):
+Наприклад, тут `` має дочірні `
` і `
` (і кілька пустих текстових вузлів):
```html run
@@ -86,22 +86,22 @@ For instance, here `` has children `
` and `
` (and few blank text
```
-...And descendants of `` are not only direct children `
`, `
` but also more deeply nested elements, such as `
` (a child of `
`) and `` (a child of `
`) -- the entire subtree.
+...А нащадками `` є не тільки прямі дочірні елементи `
`, `
`, але й більш глибоко вкладені елементи, такі як `
` (дочірній елемент `
`) та `` (дочірній елемент `
`) -- тобто усе піддерево.
-**The `childNodes` collection lists all child nodes, including text nodes.**
+**Колекція `childNodes` містить список усіх дочірніх вузлів, включаючи текстові вузли.**
-The example below shows children of `document.body`:
+Наведений нижче приклад показує дочірні елементи `document.body`:
```html run
-
Begin
+
Початок
-
Information
+
Інформація
-
End
+
Кінець
- ...more stuff...
+ ...щось ще...
```
-Please note an interesting detail here. If we run the example above, the last element shown is `
````
-## Siblings and the parent
+## Сусідні і батьківський елементи
-*Siblings* are nodes that are children of the same parent.
+*Сусіди*, або сусідні вузли -- це вузли, які мають однаковий батьківський елемент.
-For instance, here `` and `` are siblings:
+Наприклад, тут `` і `` є сусідами:
```html
@@ -192,64 +192,64 @@ For instance, here `` and `` are siblings:
```
-- `` is said to be the "next" or "right" sibling of ``,
-- `` is said to be the "previous" or "left" sibling of ``.
+- `` вважається "наступним" або сусідом "праворуч" для ``,
+- `` вважається "попереднім" або сусідом "ліворуч" для ``.
-The next sibling is in `nextSibling` property, and the previous one - in `previousSibling`.
+Наступний сусід знаходиться у властивості `nextSibling`, а попередній -- у `previousSibling`.
-The parent is available as `parentNode`.
+Батьківський вузол доступний як `parentNode`.
-For example:
+Наприклад:
```js run
-// parent of is
+// батьком є
alert( document.body.parentNode === document.documentElement ); // true
-// after goes
+// після іде
alert( document.head.nextSibling ); // HTMLBodyElement
-// before goes
+// після іде
alert( document.body.previousSibling ); // HTMLHeadElement
```
-## Element-only navigation
+## Навігація лише за елементами
-Navigation properties listed above refer to *all* nodes. For instance, in `childNodes` we can see both text nodes, element nodes, and even comment nodes if they exist.
+Властивості навігації, перераховані вище, відносяться до *всіх* вузлів. Наприклад, у `childNodes` ми можемо побачити як текстові вузли, так і вузли елементів і навіть вузли коментарів, якщо вони існують.
-But for many tasks we don't want text or comment nodes. We want to manipulate element nodes that represent tags and form the structure of the page.
+Але для багатьох задач нам не потрібні текстові вузли чи вузли коментарів. Ми хочемо маніпулювати вузлами елементів, які представляють теги та формують структуру сторінки.
-So let's see more navigation links that only take *element nodes* into account:
+Тож давайте подивимося властивости зі спеціальними посиланнями, які враховують лише *вузли елементи*:

-The links are similar to those given above, just with `Element` word inside:
+Посилання подібні до наведених вище, лише із словом `Element` всередині:
-- `children` -- only those children that are element nodes.
-- `firstElementChild`, `lastElementChild` -- first and last element children.
-- `previousElementSibling`, `nextElementSibling` -- neighbor elements.
-- `parentElement` -- parent element.
+- `children` -- тільки ті дочірні елементи, які є вузлами елементами.
+- `firstElementChild`, `lastElementChild` -- перший і останній дочірні елементи.
+- `previousElementSibling`, `nextElementSibling` -- сусідні елементи.
+- `parentElement` -- батьківський елемент.
-````smart header="Why `parentElement`? Can the parent be *not* an element?"
-The `parentElement` property returns the "element" parent, while `parentNode` returns "any node" parent. These properties are usually the same: they both get the parent.
+````smart header="Чому `parentElement`? Чи може батько бути *не* елементом?"
+Властивість `parentElement` повертає батьківський елемент "element", тоді як `parentNode` повертає батьківський "будь-який вузол". Ці властивості зазвичай однакові: обидва вони отримують батьківський елемент.
-With the one exception of `document.documentElement`:
+За одним винятком `document.documentElement`:
```js run
alert( document.documentElement.parentNode ); // document
alert( document.documentElement.parentElement ); // null
```
-The reason is that the root node `document.documentElement` (``) has `document` as its parent. But `document` is not an element node, so `parentNode` returns it and `parentElement` does not.
+Причина в тому, що кореневий вузол `document.documentElement` (``) має `document` як батьківський. Але він має тип `document` -- це не елемент, тому `parentNode` повертає його, а `parentElement` ні.
-This detail may be useful when we want to travel up from an arbitrary element `elem` to ``, but not to the `document`:
+Ця деталь може бути корисною, коли ми хочемо перейти від довільного елемента `elem` до ``, але не до `document`:
```js
-while(elem = elem.parentElement) { // go up till
+while(elem = elem.parentElement) { // ідемо вверх поки не дійдемо до
alert( elem );
}
```
````
-Let's modify one of the examples above: replace `childNodes` with `children`. Now it shows only elements:
+Давайте змінимо один із прикладів вище: замінимо `childNodes` на `children`. Тепер він показує лише елементи:
```html run
@@ -274,31 +274,31 @@ Let's modify one of the examples above: replace `childNodes` with `children`. No
```
-## More links: tables [#dom-navigation-tables]
+## Ще корисних властивостей: таблиці [#dom-navigation-tables]
-Till now we described the basic navigation properties.
+До цих пір ми описали основні властивості для навігації.
-Certain types of DOM elements may provide additional properties, specific to their type, for convenience.
+Деякі типи елементів DOM можуть надавати додаткові властивості, специфічні для їх типу, для зручності.
-Tables are a great example of that, and represent a particularly important case:
+Таблиці є чудовим прикладом цього і представляють особливо важливий випадок:
-**The `
`** element supports (in addition to the given above) these properties:
-- `table.rows` -- the collection of `
` elements of the table.
-- `table.caption/tHead/tFoot` -- references to elements `
`, `
`, `
`.
-- `table.tBodies` -- the collection of `` elements (can be many according to the standard, but there will always be at least one -- even if it is not in the source HTML, the browser will put it in the DOM).
+**Елемент`
`** підтримує (на додаток до наведених вище) такі властивості:
+- `table.rows` -- набір елементів `
` таблиці.
+- `table.caption/tHead/tFoot` -- посилання на елементи `
`, `
`, `
`.
+- `table.tBodies` -- колекція елементів `` (за стандартом може бути багато, але завжди буде принаймні один -- навіть якщо його немає у вихідному HTML, браузер помістить його в DOM).
-**``, ``, ``** elements provide the `rows` property:
-- `tbody.rows` -- the collection of `
` inside.
+**Елементи ``, `
`, ``** забезпечують властивість `rows`:
+- `tbody.rows` -- колекція `
` всередині.
**`
`:**
-- `tr.cells` -- the collection of `
` and `
` cells inside the given `
`.
-- `tr.sectionRowIndex` -- the position (index) of the given `
` inside the enclosing `/
/`.
-- `tr.rowIndex` -- the number of the `
` in the table as a whole (including all table rows).
+- `tr.cells` -- колекція клітинок `
` у таблиці в цілому (враховуючи всі рядки таблиці без виключення).
-**`
` and `
`:**
-- `td.cellIndex` -- the number of the cell inside the enclosing `
`.
+**`
` і `
`:**
+- `td.cellIndex` -- номер клітинки у рядку `
`.
-An example of usage:
+Приклад використання:
```html run height=100
@@ -317,17 +317,17 @@ An example of usage:
```
-The specification: [tabular data](https://html.spec.whatwg.org/multipage/tables.html).
+Специфікація: [табличні дані](https://html.spec.whatwg.org/multipage/tables.html).
-There are also additional navigation properties for HTML forms. We'll look at them later when we start working with forms.
+Існують також додаткові властивості навігації для HTML-форм. Ми розглянемо їх пізніше, коли почнемо працювати з формами.
-## Summary
+## Підсумки
-Given a DOM node, we can go to its immediate neighbors using navigation properties.
+Для вузла DOM, ми можемо перейти до його безпосередніх сусідів за допомогою властивостей навігації.
-There are two main sets of them:
+Існує два основних набори:
-- For all nodes: `parentNode`, `childNodes`, `firstChild`, `lastChild`, `previousSibling`, `nextSibling`.
-- For element nodes only: `parentElement`, `children`, `firstElementChild`, `lastElementChild`, `previousElementSibling`, `nextElementSibling`.
+- Для всіх вузлів: `parentNode`, `childNodes`, `firstChild`, `lastChild`, `previousSibling`, `nextSibling`.
+- Лише для вузлів елементів: `parentElement`, `children`, `firstElementChild`, `lastElementChild`, `previousElementSibling`, `nextElementSibling`.
-Some types of DOM elements, e.g. tables, provide additional properties and collections to access their content.
+Деякі типи елементів DOM, напр. таблиці, надають додаткові властивості та колекції для доступу до їх вмісту.
diff --git a/2-ui/1-document/03-dom-navigation/dom-links-elements.svg b/2-ui/1-document/03-dom-navigation/dom-links-elements.svg
index fd0b2826a..8924bc1e1 100644
--- a/2-ui/1-document/03-dom-navigation/dom-links-elements.svg
+++ b/2-ui/1-document/03-dom-navigation/dom-links-elements.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/2-ui/1-document/03-dom-navigation/dom-links.svg b/2-ui/1-document/03-dom-navigation/dom-links.svg
index 6c34bca4a..55e5181d4 100644
--- a/2-ui/1-document/03-dom-navigation/dom-links.svg
+++ b/2-ui/1-document/03-dom-navigation/dom-links.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file