What does the document object of a webpage store?

The content and tags of the webpageThe lines of code of the script

The document object stores the content and tags of the webpage.