This <samp> element displays text in a monospaced or fixed-width font. It is typically used to display code samples.
<samp> |
Yes | Yes | Yes | Yes | Yes |
None.
The <samp> tag supports the Global Attributes in HTML.
The <samp> tag supports the Event Attributes in HTML.
samp { font-family: monospace; }
A demo showing how to use <samp> tag.
<html>
<body>
<p>
You can apply the
<samp>style</samp>
attribute to nearly any element.
</p>
</body>
</html>