Table of contents
No headings in the article.
When you request a website, no matter what backend language is powering that website, it will respond with HTML. The browser receives a stream of HTML. The bytes are run through a complicated (but fully documented) parsing process that determines the different characters (e.g. the start tag character
<, an attribute like
href, a closing angle bracket like ```
open the console on this page
type out the word document
careful not to declare it const document
careful not to wrap it in quotes document
Viewing the document object in the DevTools' Console pane.
In addition to the properties defined in this specification, the global object may have an additional host-defined property. This may include a property whose value is the global object itself; for example, in the HTML document object model, the window property of the global object is the global object itself. (source)
The DOM is standardized by the W3C. There are a number of specifications that make up the DOM, here are a few:
Load and Save Specification
Did you find this article valuable?
Support Prateek Singh by becoming a sponsor. Any amount is appreciated!