All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

What hierarchy does the DOM (Document Object Model) have?

Post cover: What hierarchy does the DOM (Document Object Model) have?
Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
Dom Hierarchy (Document Object Model) consists of objects that represent the structure of an HTML or XML document in the form of a tree. here is described in a little more detail about what a DOM is. And now let's consider the main levels of the DOM hierarchy:

Document

A root object that represents the document itself. It contains all other DOM objects and is an entry point for accessing other elements.

Element

Nodes that represent HTML tags (eg <div>, <p>, <a>). Items can have attributes, text content, and nested items.

Attribute

Attributes that store additional information about items. For example, the attribute class, id, href, etc.

Text

Nodes that represent the text content of an element. They are children of elements, but cannot have their children.

Comment

Nodes that represent comments in an HTML or XML document.

DocumentFragment

Used to create and manipulate a group of nodes without affecting the real document until those nodes are added to the document.

Node

General class for all nodes in the DOM. Other nodes, such as Element, Text, and Comment, are subtypes of Node.
The DOM hierarchy works like a tree, where each element is a node (node), and each node can have child nodes, forming a tree-like structure with a root in Document and leaves at the level of text nodes or comments.

This post doesn't have any additions from the author yet.

Що таке .gitignore? Для чого потрібен та як використовувати
02 Aug 14:58

Що таке .gitignore? Для чого потрібен та як використовувати

meme code
meme code@memecode
Як видалити файл .DS_Store з Git репозиторію?
02 Aug 19:34

Як видалити файл .DS_Store з Git репозиторію?

meme code
meme code@memecode
Що таке ідемпотентний метод?
21 Aug 20:57

Що таке ідемпотентний метод?

meme code
meme code@memecode
What is a repository?
21 Aug 21:25

What is a repository?

meme code
meme code@memecode
What is a commit in the context of programming and SCM/Git?
21 Aug 21:37

What is a commit in the context of programming and SCM/Git?

meme code
meme code@memecode
What is SCM (Source Control Management)?
21 Aug 21:46

What is SCM (Source Control Management)?

meme code
meme code@memecode
Як працює модель штучного інтелекту?
15 Sep 16:42

Як працює модель штучного інтелекту?

meme code
meme code@memecode
What does relational mean (in the context of relational databases)?
21 Sep 08:27

What does relational mean (in the context of relational databases)?

meme code
meme code@memecode
What is RDBMS (relational database management system)?
21 Sep 08:56

What is RDBMS (relational database management system)?

meme code
meme code@memecode
 What does the ACID principle mean in programming?
24 Sep 20:31

What does the ACID principle mean in programming?

meme code
meme code@memecode
What is Sonvention over Sonfiguration (in the context of RoR and beyond)?
26 Sep 07:47

What is Sonvention over Sonfiguration (in the context of RoR and beyond)?

meme code
meme code@memecode
Округлення десяткових чисел: математичні правила, JavaScript і Ruby
18 Oct 12:59

Округлення десяткових чисел: математичні правила, JavaScript і Ruby

meme code
meme code@memecode