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 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 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 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 <data> Tag

Example The following example displays product names but also associates each name with a product number: <ul> <li><data value=”21053″>Cherry Tomato</data></li> <li><data value=”21054″>Beef Tomato</data></li> <li><data value=”21055″>Snack Tomato</data></li> </ul> Try it Yourself » Definition and Usage The <data> tag links the given content with a machine-readable translation. This element provides both a machine-readable value for data processors, and a human-readable […]

HTML DOM Blockquote Object

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

HTML <embed> Tag

Example An embedded flash animation: <embed src=”helloworld.swf”> Try it Yourself » Definition and Usage The <embed> tag defines a container for an external application or interactive content (a plug-in). Browser Support Element <embed> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 The <embed> tag is new in HTML5. Note: Many web browsers have supported […]

HTML DOM Abbreviation Object

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