HTML Tag


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>

Updated on: 30-Jul-2019

16 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements