
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How do we do computer output formatting using the tag in HTML?
We use <samp> tag to do computer output format. It is a phrase tag. It is used to define and identify the sample output of a computer program. It will display the text inside the <samp> element in monotype font.
Syntax
<samp>The text…</samp>
Example 1
Following is a simple example to explain the usage of <samp> tag in HTML −
<html> <head> <meta charset="UTF-8"> <meta name="description" content="meta tag in the web document"> <meta name="keywords" content="HTML,CSS"> <meta name="author" content="lokesh"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <p><b>Pluralsight</b> is the technology workforce development company that helps teams know more and work better together with stronger skills, improved processes</p> <samp> Pluralsight, Inc. is an American privately held online education company that offers a variety of video training courses for software developers </samp> </body> </html>
Example 2
Another example to use this tag in html document is −
<html> <head> <title>Title of the document</title> </head> <body> <samp> <h2> HTML document</h2> <p>This is a paragraph.</p> <p>This is another paragraph</p> </samp> </body> </html>
Example 3
We can override the font style using the style sheet.
<html> <head> <meta charset="UTF-8"> <meta name="description" content="meta tag in the web document"> <meta name="keywords" content="HTML,CSS"> <meta name="author" content="lokesh"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> samp{ font-family: cursive; } </style> </head> <body> <p><b>Pluralsight</b> is the technology workforce development company that helps teams know more and work better together with stronger skills, improved processes</p> <samp> Pluralsight, Inc. is an American privately held online education company that offers a variety of video training courses for software developers </samp> </body> </html>
- Related Articles
- How do we do variable formatting using the tag in HTML?
- How do we style HTML elements using the division tag ?
- How do we style HTML elements using the span tag ?
- Why do we use head tag in HTML Page?
- How do we add a sample computer code in HTML?
- How can we do the basic print formatting for Python numbers?
- How to use the tag for keyboard input formatting in HTML?
- How do I center tag using CSS?
- How do we send an email using HTML forms?
- How do I get a parent HTML Tag with Selenium WebDriver using Java?
- Why do we need Computer Networks?
- HTML DOM Samp Object
- How do we include big text in HTML?
- How do we display a script in HTML?
- How do we include an anchor in HTML?

Advertisements