HTML <code> Tag is employed to represent code. it’s a phrase tag that defines a bit of code. By default, it’s displayed within the browser’s default monospace font (also called fixed-width font).
The <code> Tag is employed to outline a bit of code. The content within is displayed within the browser’s default monospace font.
Example:-
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
HTML code tag
</title>
</head>
<body>
<h1>This is HTML Code Tag Example</h1>
<p>hiiii We Learn <code>Coding with Myprograming</code></p>
<p>Amitabh Bachchan born Amitabh Srivastava;<code> 11 October 1942 is an Indian actor, <br>film producer, television host, occasional playback singer and former politician known for his work in Hindi cinema.</code></p>
</body>
</html>
Output-
Note:- This tag isn’t deprecated. However, it’s potential to attain richer impact by victimization CSS (see example below).
Also look at:
2 thoughts on “HTML Code Tag”