What is document in html

WBOY
Release: 2022-06-17 16:18:01
Original
6392 people have browsed it

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.

What is document in html

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What is html document

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:

What is document 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template