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

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

HTML DOM Cite Object

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

HTML DOM Address Object

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