1. Home
  2. Computing & Technology
  3. Web Design / HTML

<samp></samp>

By Jennifer Kyrnin, About.com

<samp> Description:

The <samp></samp> tag designates sample output from scripts and computer programs.

<samp> Web Browser Support:
<samp> Attributes:
<samp> End Tag:
</samp> REQUIRED
<samp> Contents:

Usually HTML text. The following tags are valid within the <samp> tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, samp, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, textarea, tt, u, var

<samp> Valid Context:

The <samp> tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, samp, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

<samp> Usage:
  • sample text
    After you hit enter, the computer will respond with:
    <samp>
    choose a number between 1 and 10
    </samp>
<samp> Special Notes:
  • Most browsers display the samp tag in a monospace font.
  • If you want your text to be monospaced, and it is not a segment of sample text, you should use the <tt> tag or style sheets.
More <samp> Information:

Return to XHTML Element (HTML Tags) Library

About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >