HTML / HTML Tags

HTML <Samp> Tag

Dec 12, 2022
1 min read
HTML samp Tag

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