Text Content
HTML <samp> element
Represents sample output from a computer program or system. Use samp for example output, such as a terminal response. Combine with pre when whitespace matters; distinguish output from code that a learner types or executes. It accepts global HTML attributes; individual global features may be inapplicable or restricted.
Formal Syntax & Structure
html syntaxhtml
<samp>Sample output</samp>Return Value
HTMLElement
Content model: Phrasing content, with element-specific restrictions.
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>HTML example</title> </head> <body> <p> The program reports <samp>File saved.</samp> </p> </body></html>