html tag and its cooresponding JavaScript class
All HTML elements are represented by an instance of HTMLElement or a more specific subtype.
The following table lists each HTML element and its associated type.
Grouping element objects with no additional properties
Name | DOM Object |
---|---|
div | HTMLDivElement |
dl | HTMLDListElement |
hr | HTMLHRElement |
p | HTMLParagraphElement |
pre | HTMLPreElement |
ul | HTMLUListElement |
The br and span elements are represented by the HTMLBRElement and HTMLSpanElementobjects, respectively. These objects do not define any additional methods, properties, or events beyond those of HTMLElement.
The following elements are represented solely by HTMLElement: abbr, b, cite, code, dfn, em, i, u, kbd, mark, rt, rp, ruby, s, samp, small, strong, sub, sup, var, and wbr.
Home
JavaScript Book
DOM
JavaScript Book
DOM
DOM Model:
- Document Object Model
- nodeName and nodeValue Properties
- Node Relationships:childNodes
- parentNode
- previousSibling and nextSibling properties
- lastChild and firstChild
- appendChild() adds a node to the end of the childNodes list
- insertBefore()
- ownerDocument property
- removeChild
- replaceChild()
- Working with Text
- Check the length of NodeList
- Convert NodeList to an Array
- html tag and its cooresponding JavaScript class