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 Link Object

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