Articles → HTML → Code Tag In HTML

Code Tag In HTML






Purpose





Syntax


<code>
        Code…
</code>



Example


<!DOCTYPE html>
<html lang="en"
	xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<code>
        
    var app = angular.module('app', []);
    app.controller('myController', function ($scope) {
        $scope.ClickMe = function () {
            alert("Click me");
        }
    });

    </code>
	</body>
</html>

Try It


Output


Picture showing the output of the code tag in html



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, March 15, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250