Articles → HTML 5 → samp tag in HTML5

samp tag in HTML5






Purpose





Example


<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />

    <title></title>
    The output of JavaScript code
    <code>
        document.write("Test");
    </code>
    is
    <samp>Test</samp>
</head>
<body>
</body>
</html>



Output



Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, March 30, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250