Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to write sample output of a computer program using HTML5 ?

  • Last Updated : 03 Jun, 2020

In this article, we will write the sample output of a computer program by using a <samp> tag in the document. It is a phrase tag and used to define the sample output text from a computer program.


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

<samp> Contents... </samp>


<!DOCTYPE html>
        Define sample output
        from a computer program
        body {
            text-align: center;
        .gfg {
            font-size: 40px;
            font-weight: bold;
            color: green;
        .geeks {
            font-size: 25px;
            font-weight: bold;
    <div class="gfg">
    <div class="geeks">
        HTML5: How to define sample
        output from a computer program?
        A computer science
        portal for Geeks


Supported Browsers:

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!