Dom.
Dumb stands for document object model, so it's a programming interface for HTML documents, so we can
say it provides an API for programming languages to change the document structure, style and content.
And what I mean by document is a Web page.
So Web page is a document which can be viewed in a browser, and this is how it's usually done or as
the HTML source document as well.
So Dom treats each HTML elements in a document and the document itself is objects.
Then it creates a logical tree for this document.
So let's go back to the sample page and view the Dom tree, so here's our sample page.
It's pretty simple and it's displayed like this now, sort of view the dumb tree and other features.
We need to use the web developer tool.
So I can also open it by pressing control shift I so this is the developer tool interface now under
the inspector tab you can view current Doomtree.
And every element in an e-mail document such as tables, headers, text and and even the document itself
is defined as an object for Dom and they are represented hierarchically in the Dom tree.
So look at this by clicking this little icon here on the upper left hand corner, an element Werdum
object can be directly inspected.
And there is an image object here.
So already it has a source attribute.
But with this in line JavaScript, the source will be changed when the user clicks on the image.
Also under the dome tab, we can observe the property's methods and their current values, as you can
see, the list is going down way below when you scroll down.
And by using the dome methods and properties, you can add, delete or change any element in an HTML
document.
So it's close the developer tool and view the page source.
Scroll down a little bit.
And here's the image that we're looking for.
See the value of sauce attribute Inspector Dot Panji and the JavaScript code that will run when the
user clicks on it.
So you can manipulate the DOM with scripting languages such as JavaScript now for Web development purposes,
generally JavaScript is used, the DOM can also be built for any language such as Python and many other
scripting languages.
And that's the most important part of doing so now is close up this tab and click on the image.
And it has changed, so this means that we change the value of the source attribute.
Some analysts view the page source again.
And I think you see what I see, there is no change.
It's still the same.
So then let's close the tab and return to the page, open the developer tool by pressing the shortcut,
control shiti and inspect the image element.
As you can see, we can observe the change here in the dome.
So an important thing here to stress is that the original HTML source document is not always exactly
the same as the DOM tree because you can use JavaScript to change anything in the source.
Now, another important feature of dumb is when there is something wrong, something not valid in the
HTML document dump can also validate the document.
Although it's an important topic, I really think that that's pretty much a tough talk about it.
Let's move on, shall we?