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

Example Format text in a document: <samp>Sample output from a computer program</samp> Try it Yourself » Definition and Usage The <samp> tag is a phrase tag. It defines sample output from a computer program. Tip: This tag is not deprecated, but it is possible to achieve richer effect with CSS. All phrase tags: Tag Description <em> […]