DOM HTMLCollection

An HTMLCollection object is an array-like list of HTML elements. Methods like the getElementsByTagName() returns an HTMLCollection. Properties and Methods The following properties and methods can be used on a HTMLCollection object: Property / Method Description item() Returns the element at the specified index in an HTMLCollection length Returns the number of elements in an […]

HTML DOM Ins Object

Ins Object The Ins object represents an HTML <ins> element. Access an Ins Object You can access an <ins> element by using getElementById(): Example var x = document.getElementById(“myIns”); Try it Yourself » Create an Ins Object You can create an <ins> element by using the document.createElement() method: Example var x = document.createElement(“INS”); Try it Yourself » Ins […]

HTML DOM Code Object

The Code object represents an HTML <code> element. Access a Code Object You can access a <code> element by using getElementById(): Example var x = document.getElementById(“myCode”); Try it Yourself » Create a Code Object You can create a <code> element by using the document.createElement() method: Example var x = document.createElement(“CODE”); Try it Yourself » Standard Properties and […]