<samp>
The <samp> element represents a sample or quoted output from a computer program. Styled in a monospace font by default.
Overview
The <samp> element represents a sample or quoted output from a computer program. Styled in a monospace font by default.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | ≤4 | 18 | ≤3.2 | |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Syntax
HTML
<p>Console output: <samp>Hello, World!</samp></p>
<p>Error:<samp> File not found</samp></p> Live demo
Use cases
Using <samp>
The <samp> element represents a sample or quoted output from a computer program. Styled in a monospace font by default.
Cautions
- May not be supported in older browsers.
Accessibility
- Verify how this element is announced by screen readers.
Related links
Powered by web-features