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>



Output



Click to Enlarge


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