<samp> Tag Examples
Examples of the samp
tag in HTML 5
Examples of using the <samp> tag to display sample output
<p>If you use a block tag inside the <samp> element, HTML
validators will report an error such as <q><samp>element not allowed
as child of element <samp> in this context.</samp></q></p>
<p>Example of using the <samp> tag to display sample output from some keyboard input:</p>
<figure>
<style scoped="scoped">
kbd { font-weight: bold }
kbd, samp { font-family: Consolas, Monaco, monospace }
</style>
<pre><kbd>select 1024 * 1024 * 1024 * 1024 as " 1 Terabyte";</kbd><samp>
-------------
1 Terabyte
-------------
1099511627776</samp></pre>
</figure>