HTML <samp> tag

By Jonathan Griffin. Editor, SEO Consultant, & Developer.

· 1 min read

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

ChromeEdgeFirefoxIEOperaSafari
YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes