Source - the source code of the page received from the server.
DOM - is a tree of objects created by the browser in the computer memory based on the source code ( Source ).
To simplify things a lot, the browser works like this:
You enter a URL into the address bar and press enter.
The browser sends a request to the server.
The server returns the response as the HTML source of the page ( Source )
Based on the source code, the browser builds the DOM (Data Object Model - document object model)
handles errors (adds tags html, body, head, etc. if they were not written)
closes unclosed tags
adds a <tbody> tag to tables if it was not there. According to the DOM, tables (<table>) should have a <tbody> tag, and in HTML it can be omitted (this should be taken into account when building XPath and regular expressions )
processes scripts on the page (which can add new elements to the page, and do this even after the page is fully loaded)
Finally, the DOM-based browser renders and shows you the content of the web page.
When working with requests ( GET , POST and other types of requests ), you will always deal with Source.
There are two tools for viewing Source and DOM in ProjectMaker: