HTML <code> Tag

The <code> tag is used to mention a specific text is a computer code.

During website development, It is mandatory to show the Output result, error message, or coding part to a user on a webpage.

Syntax :

<code> Computer Code </code>

Example :

<!DOCTYPE html>
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>HTML Computer code</title>
    <h2>Computer Code</h2>
    <p>Programming code:</p>
      x = 30;<br />
      y = 20;<br />
      z = x + y;

Output :