samp ElementThe samp element is an inline element declared by the XHTML 1.1 Text Module (Inline Phrasal)
Elements in the Text Module are:span | br (Inline Structural Support Module)em | strong | q | cite | abbr | acronym | code | var | kbd | samp | dfn (Inline Phrasal Support Module)div | p (Block Structural Support Module)h1 - h6 | blockquote | pre | address (Block Phrasal Support Module)
The samp element is used to enclose sample output from a computer program or a script.
The contents of a samp element are commonly rendered in a monospace font.
Here is an example of the use of the samp element:
<p>If you type the command <kbd>uname -r</kbd>
then your kernel release will be displayed: e.g. <samp>2.6.18-92.1.1.el5</samp></p>
This renders as:
If you type the command uname -r then your kernel release will be displayed: e.g. 2.6.18-92.1.1.el5
There are no styles applied to the samp element above so its contents have been rendered using your browser's default behaviour.
See also the elements: code, kbd and var.
There are no #REQUIRED attributes on the samp element.
There are no specific attributes declared on the samp element.
samp element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
samp element is:
( #PCDATA | Inline.mix )*
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
sampabbr, acronym, br, cite, code, dfn, em, kbd, q, samp, span, strong, varabutton, input, label, select, textareaimgb, big, i, small, sub, sup, ttmapnoscript, scriptdel, insbdoobjectrubysampabbr, acronym, address, cite, code, dfn, div, em, h1 - h6, kbd, p, pre, q, samp, span, strong, varadd, dt, licaption, td, thbutton, fieldset, label, legendb, big, i, small, sub, sup, ttdel, insbdoobjectrb, rt