The HTML DOM is:
Standard object model for HTML
Standard programming interface for HTML
The HTML DOM defines the objects and properties of all HTML elements, as well as the methods (interfaces) to access them.
This time I used some common methods that we can perform on nodes (HTML elements).
All HTML elements are defined as objects, while programming interfaces are object methods and object properties.
For example, actions that can be performed (such as adding or modifying elements).
An attribute is a value that can be obtained or set (such as the name or content of a node).
HTML DOM objects – methods and properties
Some common HTML DOM methods:
getElementById(id) – get the node (element) with the specified id
appendChild(node) – insert a new child node (element)
removeChild(node) – delete child node (element)
Some common HTML DOM attributes:
innerHTML – the text value of the node (element)
parentNode – the parent of the node (element)
childNodes – children of nodes (elements)
Attributes – the attribute node of the node (element)
Definition and Usage：
display property specifies the display behavior (the type of rendering box) of an element.
In HTML, the default display property value is taken from the HTML specifications or from the browser/user default style sheet. The default value in XML is inline, including SVG elements.
Summary and outlook：
In this updated code, I used some of the usages of HTML (DOM) and CSS (element style : display property) I have learned, trying to update existing code and get through. Usually, in the process of fixing the code, we need to combine a variety of knowledge points to achieve the best results expected. And, during this revision, I revisited some of the knowledge of HTML and CSS, so that I can once again understand some of the problems in “Web Programming.” This makes me feel full.