<samp>
<samp>
Tag
The <samp>
element is used to display sample output generated by a program, script, or system command. It is typically styled in a monospaced font to visually distinguish system responses from regular text.
Syntax
<samp>Sample Output Text</samp>
<samp>
Demo
The result of the command is: File not found
<p>
The result of the command is: <samp>File not found</samp>
</p>
<samp>
tag is still valid, but CSS can provide more flexible styling options.Attributes
The <samp>
element supports global attributes.
Key Points
- Purpose: Used to display sample output from commands or scripts, making it easier to distinguish system-generated responses.
- Styling: Rendered in a monospaced font to resemble terminal or console output.
- Usage: Ideal for documentation, tutorials, and examples that include program or command outputs.
See Also
- Related tags:
<kbd>
,<code>
,<pre>
- The
<output>
tag: used for displaying dynamic script-generated results.
Conclusion
The <samp>
tag is useful for presenting sample output from computer programs, scripts, or system commands. It helps maintain readability by using a monospaced font to mimic terminal responses. While the tag is still widely supported, CSS allows for additional customization and styling.
<s>
The HTML <s> element denotes text that is no longer relevant or correct, usually shown with a strike through to indicate its inaccuracy or inapplicability.
<small>
The HTML <small> element displays text in a smaller font size, commonly used for annotations, fine print, or additional information, while preserving the original semantic meaning of the content.