HTML DOM Option Object

Option Object The Option object represents an HTML <option> element. Access an Option Object You can access an <option> element by using getElementById(): Example var x = document.getElementById(“myOption”); Try it Yourself » Tip: You can also access an Option object by searching through the elements collection of a form, or the options collection of a drop-down list. Create an Option Object […]

HTML DOM Summary Object

Summary Object  The Summary Object is new in HTML5. The Summary object represents an HTML <summary> element. Note: The <summary> element is currently only supported in Chrome, Safari 6+ and Opera 15+. Access a Summary Object You can access a <summary> element by using getElementById(): Example var x = document.getElementById(“mySummary”); Try it Yourself » Create a Summary […]

HTML DOM Superscript Object

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

HTML DOM Table Object

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

HTML DOM OptionGroup Object

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

HTML DOM Ol Object

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

HTML DOM Object Object

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

HTML DOM Nav Object

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

HTML DOM Textarea Object

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

HTML DOM Mark Object

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

HTML DOM Map Object

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

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 […]

HTML DOM Label Object

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

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

Head Object The Head object represents an HTML <head> element. Access a Head Object You can access a <head> element by using getElementsByTagName(): var x = document.getElementsByTagName(“HEAD”)[0]; Create a Head Object You can create a <head> element by using the document.createElement() method: var x = document.createElement(“HEAD”); Standard Properties and Events The Anchor object also supports the standard properties and events.

HTML DOM Heading Object

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

HTML DOM Form Object

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

HTML DOM Footer Object

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

HTML DOM Figcaption Object

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

HTML DOM Emphasized Object

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