HTML DOM Samp Object

The Samp object represents an HTML <samp> element

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");

Create a Samp Object

You can create a <samp> element by using the document.createElement() method:

Example

var x = document.createElement("SAMP");

Standard Properties and Events

The Samp object supports the standard properties and events.

Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <samp> tag