Skip to content
Related Articles

Related Articles

Improve Article

HTML <samp> Tag

  • Difficulty Level : Basic
  • Last Updated : 11 Jun, 2021

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
  • Firefox
  • Opera
  • Internet Explorer

 

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :