HTML | <samp> Tag

It is a phrase tag and used to define the sample output text from a computer program.

Syntax:

<samp> Contents... </samp>

Example:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>samp tag</title>
    </head>
    <style>
        body {
            text-align:center;
        }
        .gfg {
            font-size:40px;
            font-weight:bold;
            color:green;
        }
        .geeks {
            font-size:25px;
            font-weight:bold;
        }
    </style>
    <body>
        <div class ="gfg">GeeksForGeeks</div>
        <div class = "geeks"><samp> Tag</div>
        <samp>A computer science portal for Geeks</samp>
    </body>
</html>                    

chevron_right


Output:

Supported Browsers: The browser supported by <samp> tag are listed below:

  • Apple Safari
  • Google Chrome
  • Firefox
  • Opera
  • Internet Explorer


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.