<samp>...</samp>

HTML4 HTML5

The <samp> tag (short for Sample Output) is used to mark text representing sample output generated by a computer program, operating system, script, or other application[cite: 3].

By default, browsers display text inside this tag in a fixed-width monospaced font to distinguish it from regular page content[cite: 3].

Both opening and closing tags are mandatory[cite: 3].

Attributes:

Example

In the example below, a server error message is marked using the <samp> tag[cite: 3]:

Code:

<p> When attempting to connect, the server returned message: <samp>404 Not Found</samp>. </p>

The browser will interpret this code as follows:

When attempting to connect, the server returned message: 404 Not Found.