HTML DOM Column Object

Column Object The Column object represents an HTML <col> element. Access a Column Object You can access a <col> element by using getElementById(): Example var x = document.getElementById(“myCol”); Try it Yourself » Create a Column Object You can create a <col> element by using the document.createElement() method: var x = document.createElement(“COL”); Column Object Properties Property Description span […]

HTML DOM Fieldset Object

Fieldset Object The Fieldset object represents an HTML <fieldset> element. Access a Fieldset Object You can access a <fieldset> element by using getElementById(): Example var x = document.getElementById(“myFieldset”); Try it Yourself » Tip: You can also access a Fieldset object by searching through the elements collection of a form. Create a Fieldset Object You can create a <fieldset> element […]

The CSSStyleDeclaration Object

The CSSStyleDeclaration object represents a collection of CSS property-value pairs. CSSStyleDeclaration Object Properties Property Description cssText Sets or returns the textual representation of a CSS declaration block length Returns the number of style declarations in a CSS declaration block parentRule Returns a CSS rule that is the parent of the style block CSSStyleDeclaration Object Methods […]

HTML DOM Bold Object

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

HTML DOM Audio Object

Audio Object  The Audio Object is new in HTML5. The Audio object represents an HTML <audio> element. Note: The <audio> element is not supported in Internet Explorer 8 and earlier versions. Access an Audio Object You can access an <audio> element by using getElementById(): Example var x = document.getElementById(“myAudio”); Try it Yourself » Create an Audio Object […]

The HTML DOM Element Object

In the HTML DOM, the Element object represents an HTML element, like P, DIV, A, TABLE, or any other HTML element. Properties and Methods The following properties and methods can be used on all HTML elements: Property / Method Description accessKey Sets or returns the accesskey attribute of an element addEventListener() Attaches an event handler to the […]

HTML DOM Anchor Object

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

HTML DOM Style Object

Style object The Style object represents an individual style statement. Style Object Properties The “CSS” column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3). Property Description CSS alignContent Sets or returns the alignment between the lines inside a flexible container when the items do not use all available space 3 […]

HTML DOM Section Object

Section Object  The Section Object is new in HTML5. The Section object represents an HTML <section> element. Note: The <section> element is not supported in Internet Explorer 8 and earlier versions. Access a Section Object You can access a <section> element by using getElementById(): Example var x = document.getElementById(“mySection”); Try it Yourself » Create a Section Object […]

HTML DOM Select Object

The Select object represents an HTML <select> element. Access a Select Object You can access a <select> element by using getElementById(): Example var x = document.getElementById(“mySelect”); Try it Yourself » Tip: You can also access a Select object by searching through the elements collection of a form. Create a Select Object You can create a <select> element by using […]

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

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

HTML DOM Script Object

The Script object represents an HTML <script> element. Access a Script Object You can access a <script> element by using getElementById(): Example var x = document.getElementById(“myScript”); Try it Yourself » Tip: You can also access a <script> element by using the scripts collection. Create a Script Object You can create a <script> element by using the document.createElement() method: Example […]

HTML DOM Samp Object

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

HTML DOM S Object

S Object The S object represents an HTML <s> element. Access a S Object You can access a <s> element by using getElementById(): Example var x = document.getElementById(“myS”); Try it Yourself » Create a S Object You can create a <s> element by using the document.createElement() method: Example var x = document.createElement(“S”); 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 DOM Pre Object

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

HTML DOM Strong Object

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

HTML DOM Parameter Object

Parameter Object The Parameter object represents an HTML <param> element. The <param> element is used to define parameters for plugins embedded with an <object> element. Access a Parameter Object You can access a <param> element by using getElementById(): Example var x = document.getElementById(“myParam”); Try it Yourself » Create a Parameter Object You can create a <param> […]

HTML DOM Output Object

Output Object  The Output Object is new in HTML5. The Output object represents an HTML <output> element. Note: The <output> element is not supported in Internet Explorer / Edge. Access an Output Object You can access an <output> element by using getElementById(): Example var x = document.getElementById(“myOutput”); Try it Yourself » Tip: You can also access an <output> […]