Summary -
In this topic, we described about the <code> tag along with detailed example.
Used to define the computer code. Code formatting is used to define the programming code. Code formatting uses <code> tag. Any text in between <code>..</code> defines it as programming code to browsers.
<code> element is nested element. <code> tag is also a phrase tag. The <code> element text normally displayed in a monospaced font. Multiple lines of code can be surrounding the <code> tags with <pre> tags.
Syntax -
<code>.... HTML text here </code>
Example -
<!DOCTYPE html>
<html>
<head>
<title> Code formatting element example.. </title>
</head>
<body>
<code>
Var a = b + c
</code>
</body>
</html>
Output -
Var a = b + c