HTML <samp> tag

The Samp tag in HTML is used for defining the sample output from the computer program. This tag is a phrase type tag and a container tag that means the closing of samp tag is important.

For displaying the output from process as an error message users use the <samp> tag.

Syntax:

<body>
<p><samp> ………… </samp></p>
</body>

Examples of Samp Tag

Example 1:

Here is an example of <samp> tag

<html>
<head>
<title> html samp tag </title>
</head>
<body>
<p> alert from garena free fire max: </p>
<p><samp> server down  
<br> you can use unlimited diamonds </samp></p>
</body>
</html>

Output:

HTML Samp Tag

Example 2:

<!DOCTYPE html>
<html>
<head>
<title> html samp tag </title>
</head>
<body>
<p>sample normal text which we see in each and every html document: </p>
<p><samp>soory to say but. 
<br> the text style or appearance will change if you use this samp tag in your page </samp></p>
</body>
</html>

Output:

HTML Samp Tag

Browser support:

List of browsers that support html samp tag are mentioned below:

Chrome: Yes

Microsoft Edge: Yes

Firefox: Yes

Safari: Yes

Opera: Yes

Default CSS Settings

The following CSS values which are saved as default in most of the browsers are defined for samp tag.

Example

samp {
font-family: monospace;
}