{"id":9255,"date":"2022-10-06T03:51:19","date_gmt":"2022-10-06T03:51:19","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9255"},"modified":"2022-10-06T03:51:19","modified_gmt":"2022-10-06T03:51:19","slug":"html-tag","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-tag\/","title":{"rendered":"HTML <!-- ... --> tag"},"content":{"rendered":"\n<p>The &lt;!&#8211; &#8230; &#8211;&gt; tag is used to insert comments in an HTML code. Its content is ignored by the browsers and is not displayed by them. However, the comments are visible to anyone who views the page source code.<\/p>\n\n\n\n<p>HTML comments\u00a0point out document sections or insert notes explaining the code. The comment tag can also be used to exclude short-term code blocks instead of deleting them.<\/p>\n\n\n\n<p>Comments can be used anywhere in the documents except for the\u00a0&lt;title>\u00a0tag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax-2\">Syntax<\/h2>\n\n\n\n<p>Comments are written between &lt;!&#8211; and &#8211;&gt; symbols.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-comment-tag-4\">Example of the HTML comment tag:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Example of using the comment tag.&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    The content of the page. \n    &lt;!-- This is our comment, that is not displayed on the browser. --&gt; \n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"result-6\">Result<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/mdr.foobrdigital.com\/wp-content\/uploads\/2022\/10\/image-29.png\" alt=\"\" class=\"wp-image-9257\"\/><\/figure>\n\n\n\n<p>The comment tag can be used for \u201chiding\u201d scripts from browsers without any support for scripts.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script type=\"text\/javascript\"&gt;\n  &lt;!--\n  function displayMsg() {\n    alert(\"Comment tag\")\n  }\n  \/\/--&gt;\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>In the example above, the two forward slashes that are located at the end of the line (\/\/) is the comment symbol of JavaScript . This stops JavaScript from running the &#8211;&gt; tag.<\/p>\n\n\n\n<p>The comment tag doesn\u2019t support the\u00a0Global Attributes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Browser support<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_chrome.svg\" alt=\"chrome\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_edge.svg\" alt=\"edge\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_firefox.svg\" alt=\"firefox\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_safari.svg\" alt=\"safari\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_opera.svg\" alt=\"opera\" width=\"24\" height=\"24\"><\/th><\/tr><\/thead><tbody><tr><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The &lt;!&#8211; &#8230; &#8211;&gt; tag is used to insert comments in an HTML code. Its content is ignored by the browsers and is not displayed by them. However, the comments are visible to anyone who views the page source code. HTML comments\u00a0point out document sections or insert notes explaining the code. The comment tag can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[529],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9255"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=9255"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9255\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}