<samp> HTML Tag
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- 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.
- Display
- inline
- Usage
- textual
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.
Browser Support for samp
All | All | All | All | All | All |