Open In App
Related Articles

HTML <samp> Tag

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

<samp> Contents... </samp>


Example: 
 

HTML

<!DOCTYPE html>
<html>
 
        <body>
 
            <h1>GeeksforGeeks</h1>
            <h2><samp> Tag</h2>
            <!-- html <samp> tag is used here -->
            <samp>A computer science portal for Geeks</samp>  
             
        </body>
 
</html>                   

                    

Output: 
 


Supported Browsers: 
 

  • Apple Safari
  • Google Chrome
  • Edge 12 and above
  • Firefox 1 and above
  • Opera
  • Internet Explorer


 


Last Updated : 19 Jul, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads