HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<xmp> (Example)


This deprecated but still widely supported element indicates that the enclosed text is an example. Example text generally is rendered in a monospaced font, and the spaces, tabs, and returns are preserved, as with the pre element.

Syntax (Defined by HTML 2; Deprecated Under HTML 4)


<xmp>
</xmp>

Attributes Defined by Internet Explorer


accesskey="key" (5.5)
class="class name(s)" (4)
contenteditable="false | true | inherit" (5.5)
hidefocus="true | false" (5.5)
id="unique alphanumeric value" (4)
lang="language code" (4)
language="javascript | jscript | vbs | vbscript" (4)
style="style information" (4)
tabindex="number" (5.5)
title="advisory text" (4)
unselectable="on | off" (5.5)

Events Defined by Internet Explorer


onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu, oncontrolselect, oncopy, oncut, ondeactivate, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup, onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart, onselectstart, ontimeerror

Example


<xmp>This is a large block of text used as an example. Note that returns as well as S P A C E S are preserved.</xmp>

Compatibility


HTML 2
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4, 4.5–4.8, 6, 7
Opera 4–7

Note


This element was first deprecated under HTML 3.2, yet all major browsers continue to support it, and it is well documented and even extended for Internet Explorer. The <pre> tag or style sheets should be used instead of this tag.

(X)HTML Elements
CSS Properties
Previous: xml  
< Home | About | Chapters | Examples | Errata | Reference | Site Map >