HTML DOM Samp Object

Samp object

Samp object represents the HTML <samp> element.

Access Samp object

You can use getElementById() to access the <samp> element:

var x = document.getElementById("mySamp");

Try It Yourself

Create a Samp object

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

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

Try It Yourself

Standard Properties and Events

Samp Object Supports StandardsPropertiesandEvents.

Related Pages

HTML Tutorial:HTML Text Formatting Elements

HTML Reference Manual:HTML <samp> Tag