DOM - Document Object Model
When a Web-Page is loaded, the browser creates a DOM of the page,
constructed and presented in JS as a tree of objects
DOMtree
The javascript code document.queryselector('tasyntax');
will return this result in the console.log because it calls the class in this block

document.queryselector('tasyntax');
while the original code in thehtml is
Original text in the html

Different ways to call selectors


document.querySelector('.class')        //for Class Selector

document.querySelector(''#id')          
    ==                                  //for id selector
document.getElementById(''.className')

Typical uses of DOM

property Description
Active Element Returns the current focused element in the document
addEventListener() Attaches an event handler to the document
Body Sets or returns the document's body (body element>
Cookie Returns all name/value pairs of cookies in the document
createElement() Creates an Element node
documentElement Returns the document element of the html element
getElementById(),
getElementByClassName(),
getElementsByName(),
getElementsByTagName()
Returns element(s) by name/class/tag/id
querySelector() Returns the first element that matches a specified CSS selector
querySelectorAll() Returns all the elements that matche a specified CSS selector
Title Sets or returns the title of the document
back to main page