Computer >> Computer tutorials >  >> Programming >> HTML

How do we do computer output formatting using the <samp> tag in HTML?


<samp> tag is a phrase tag.It is used to identify the sample output from a computer program. Most browsers will display the <samp> element in monotype font.

This tag can be used in html document as −

Example

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