Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

samp — sample output

The samp element marks sample or quoted output from another program or computing system.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

<samp>sample output</samp>

samp represents sample or quoted output from another program or computing system. Distinguish it from code (code), kbd (user input), and output (immediate output in a web application).

It accepts phrasing content and global attributes. Both tags are required. It can appear within a paragraph; combine it with pre for multiline output.

The example presents a static message. samp itself does not execute a program or generate a result.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Sample output</title>
</head>
<body>
  <p><samp>Build complete.</samp></p>
</body>
</html>

Result

Build complete.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources