Loading...
HTML <samp> Tag

HTML <samp> Tag

In this tutorial, we will learn about samp tag in HTML with the help of examples.


<samp> Tag

Samp tag <samp> is used to define sample output from a computer program.
The text inside the <samp> tag is written in monospace font by default.

Syntax

<samp>.........</samp>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Samp Tag</title>
  </head>
  <body>
    <p>Message from my computer</p>
    <samp>File not found<br>Press F1 to continue</samp>
  </body>
</html>

Output

Message from my computer


File not found
Press F1 to continue

Global Attribute

Samp Tag support all the global attributes of HTML.


Event Attribute

Samp Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of <samp> tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML <script> Tag.

- Related Topics