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

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

HTML DOM Progress Object

Progress Object  The Progress Object is new in HTML5. The Progress object represents an HTML <progress> element. The <progress> element represents the progress of a task. Access a Progress Object You can access a <progress> element by using getElementById(): Example var x = document.getElementById(“myProgress”); Try it Yourself » Create a Progress Object You can create a […]

HTML Elements

An HTML element usually consists of a start tag and end tag, with the content inserted in between: <tagname>Content goes here…</tagname> The HTML element is everything from the start tag to the end tag: <p>My first paragraph.</p> Start tag Element content End tag <h1> My First Heading </h1> <p> My first paragraph. </p> <br> HTML elements with no content are called […]