{"id":117,"date":"2022-04-30T20:42:21","date_gmt":"2022-04-30T20:42:21","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=117"},"modified":"2022-04-30T20:42:21","modified_gmt":"2022-04-30T20:42:21","slug":"html-code-tag","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/html-code-tag\/","title":{"rendered":"HTML Code Tag"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>Code Tag in HTML<\/strong><\/p>\n<p>We use the code tag to define some computer code. The content within the tag is shown in the monospace font. Simply, we are defining some computer code().<\/p>\n<p>Have a look at the below example, where we are trying to use the code tag \u2192<\/p>\n<p><strong>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&#8221;en&#8221;&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta charset=&#8221;UTF-8&#8243;&gt;<br \/>\n&lt;meta http-equiv=&#8221;X-UA-Compatible&#8221; content=&#8221;IE=edge&#8221;&gt;<br \/>\n&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, initial-scale=1.0&#8243;&gt;<br \/>\n&lt;title&gt;Some heading&#8230;&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div&gt;we use the &lt;code&gt;img&lt;\/code&gt; tag for adding images to our web pages&#8230;&lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/strong><\/p>\n<p>Now, if we try to open the file in the browser, we find that the text IMG has a different font. Have a look at the output &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-118 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/html-code-tag.jpg\" alt=\"\" width=\"1024\" height=\"105\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/html-code-tag.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/html-code-tag-300x31.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/html-code-tag-768x79.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>So, whenever we need to define some computer-related code, we can use the code tag.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Code Tag in HTML We use the code tag to define some computer code. The content within the tag is shown in the monospace font. Simply, we are defining some computer code(). Have a look at the below example, where we are trying to use the code tag \u2192 &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;meta [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":{"0":"post-117","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-html-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":996,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/117\/revisions\/996"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}