Open In App

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: 
 






<!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: 
 

 

Article Tags :