element’s purpose is to identify a sample of characters that form the
output or result of some process. It’s not often seen in practice, but
would most probably be encountered in an online technical manual or
support site of some kind.
The example code would render as shown in Figure 1.
In this example, a support site provides an explanation of a 404 error:
<p>If the browser spits out an error message such as <samp>HTTP 404 - File not found</samp>, you may simply have typed the address incorrectly.</p>
Another usage that you may come across is to indicate choices from computer menu items (e.g. in a browser or application):
<p>The <samp>File</samp> menu is where you will find the important <samp>Load</samp> and <samp>Save</samp> commands</p>
Use This For …
This element is used to mark up a sequence of characters or a phrase that forms the output of some kind of machine or computer process.
samp has good browser support: most of the major
browsers render it in a fixed-width font.