O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<SAMP> — NN all IE all HTML all

Synopsis

<SAMP>...</SAMP>

End Tag: Required

The SAMP element is one of a large group of elements that the HTML 4.0 recommendation calls phrase elements. Such elements assign structural meaning to a designated portion of the document. A SAMP element is one that contains text that is sample output from a computer program or script. This is different from a code example, which is covered by the CODE element.

Browsers have free rein to determine how (or whether) to distinguish SAMP element content from the rest of the BODY element. Both Navigator and Internet Explorer elect to render the text in monospace font. This can be overridden with a style sheet as you see fit.

Example

<P>When you press the Enter key, you will see <SAMP>Hello, world!</SAMP>
on the screen.</P>

Object Model Reference

IE

[window.]document.all.elementID

Attributes

CLASS

ID

LANGUAGE

STYLE

TITLE

DIR

LANG

   

Event Handler Attributes

Handler

NN

IE

HTML

onClick

n/a

4

4

onDblClick

n/a

4

4

onDragStart

n/a

4

n/a

onHelp

n/a

4

n/a

onKeyDown

n/a

4

4

onKeyPress

n/a

4

4

onKeyUp

n/a

4

4

onMouseDown

n/a

4

4

onMouseMove

n/a

4

4

onMouseOut

n/a

4

4

onMouseOver

n/a

4

4

onMouseUp

n/a

4

4

onSelectStart

n/a

4

n/a

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required