HTML <samp> Tag

Description

The <samp> HTML element is used to display text that is the result of the output of a computer program or script. Browsers typically display text in a <samp> container in a monospaced font.

Properties

Permitted Parents
Any element that accepts phrasing content
Content
Inline and text
Start/End Tags
Start tag: required, End tag: required

Example

You will see <samp>END PROGRAM</samp> after 
it stops scrolling.
If it never stops, send the <samp>STOP</samp>
command to the program.

Attributes

None

Global Attributes

The <samp> tag also supports the Global Attributes in HTML5

Event Attributes

The <samp> tag also supports the Event Attributes in HTML5

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
YesYesYes1YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes