Home >Web Front-end >Front-end Q&A >What is document in html
In HTML, document means document object, which represents the document of the browser window; the document object is a sub-object of the window object, so it can be accessed through the "window.document" attribute. Each load HTML documents entered into the browser will become Document objects.
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
HTML Document is: HTML Document object. Every HTML document loaded into the browser will become a Document object.
Since the Document object is part of the Window object, it can be accessed through the window.document property.
The document object (document) represents the document in the browser window. This object is a sub-object of the window object. Since the window object is the default object in the DOM object model, the methods and sub-objects in the window object are not required. Use window to reference.
You can access any HTML tag contained in the HTML document through the document object and dynamically change the content in the HTML tag.
For example, forms, images, tables, hyperlinks, etc.
Let’s take a look at the Document object collection in HTML:
Let’s take a look at the description of the document object in HTML on the Internet:
The HTMLDocument interface extends the DOM Document interface and defines HTML-specific attributes and methods.
Many properties and methods are HTMLCollection objects (actually read-only arrays that can be indexed by array or name), which hold references to anchors, forms, links, and other scriptable elements.
These collection attributes are derived from level 0 DOM. They have been replaced by Document.getElementsByTagName(), but are still often used because they are very convenient
(Learning video sharing: css video tutorial, html video tutorial )
The above is the detailed content of What is document in html. For more information, please follow other related articles on the PHP Chinese website!