Definition
The <samp>
tag is used to mark up a piece of inline text representing a piece of or quoted output from a computer system or program.
Example
<samp>Error 404, Page Not Found.</samp>
Error 404, Page Not Found.
Usage
- Both the opening and closing tags are required.
- See the
<kbd>
element for using<samp>
to indicate text that is echoed back from a computer. - To mark up the immediate output or results of a calculation of a computer program, you should use the
<output>
element.
Attributes
The <samp>
element only supports the Global Attributes.
Specification
Browser Support
Desktop
Chrome | Edge | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |