Introduction
The <samp>
element in HTML is used to represent sample output from a computer program or script. It’s typically used to display text that is the result of a user’s interaction with a computer system, such as command-line output or the response from a program.
Here’s an example of how you might use it:
<!DOCTYPE html>
<html>
<head>
<title>Sample Output Example</title>
</head>
<body>
<p>The result of a simple calculation:</p>
<samp>10 + 5 = 15</samp>
</body>
</html>
Output :
In this example, the <samp>
element is used to display the result of a simple calculation, “10 + 5 = 15“. The content inside <samp>
represents the sample output of the calculation.