The document Object
The document object contains methods and
properties for interacting with the page.
Through document, you can get any element
on the page, after which you can do anything
with it: change the content, change CSS properties,
delete, clone, etc.
From document you can get 3 main
elements directly:
let html = document.documentElement // <html>
let head = document.head // <head>
let body = document.body // <body>
See Also
-
method
getElementById -
method
getElementsByClassName -
method
getElementsByTagName -
method
querySelector -
method
querySelectorAll