HTML <samp> Tag

HTMLWeb DevelopmentFront End Technology

The <samp> tag in HTML is a phrase tag like <em>, <code>, <strong>, etc and is used to format text in an HTML document. It is also used to display output from a computer program.

Let us now see an example to implement the <samp> element−

Example

 Live Demo

<!DOCTYPE html>
<html>
<body>
<h2>OS issues</h2>
<p>If the system hangs...</p>
<samp>Press CTRL + ALT + DELETE and delete the current tasks.</samp>
</body>
</html>

Output

In the above example, we have set the text inside the <samp> tag−

<samp>
Press CTRL + ALT + DELETE and delete the current tasks.
</samp>
raja
Published on 19-Jun-2019 08:42:51
Advertisements