DOM
Document Object Model
Before diving into the DOM, we must know the parents, children, siblings tags in the HTML, and a good understanding in the CSS.
In windows document every thing, can can define it with the name root, origin.
Let see what was we are getting in if we try to log the document in javascript
console.log(document)
Is the document an object?
Yes, a document is an object and if we remove the body for the document object the browser window becomes empty.
How to get the body for the document, let we try to get the body from the document object
console.log(document.body)
What are the things we can able to get from the document object
Just like the body, the head is also the sibling to the body, right so we must get something.
console.log(document.head)
need to learn and write more on this topic
Top comments (0)