<samp> HTML Tag

What does <samp> HTML Tag do?
The <samp> element is used to identify text that should be interpreted as sample output from a computer program. By default, browser render <samp> element contents in a monospace font.

Code Example

<samp>Disk fault</samp>
Disk fault

The <samp> element is used to display output from a process, such as an error message from a computer script. It was originally designed for technical documentation, and renders the content of the element in a monospace font. <samp> is well supported, and it isn’t deprecated in HTML 5, but there are arguably better ways to achieve the same result. Consider whether <code> or <pre> would be more suitable.

Claire is seasoned technical writer, editor and HTML enthusiast.

Browser Support for samp