HTML <samp> tag

Updated: 11/13/2018 by Computer Hope
HTML samp tag

When writing in HTML (hypertext markup language), the <samp> tag is an inline element used to designate sample output from a computer. It is usually shown in the browser's default monotype font. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.

Note

This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.

Example of <samp> code

<p>Normal text. <samp>Sample text.</samp> Normal text.</p>

Example result

Normal text. Sample text. Normal text.

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. Unlike other HTML tags, the <samp> tag has no unique attributes.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All versions All versions All versions

Additional phrase tags

Block of text, Browser, Compatibility, Container tag, CSS, HTML bold tag, HTML strong tag, Web design terms