{"id":776,"date":"2023-04-20T04:51:38","date_gmt":"2023-04-20T03:51:38","guid":{"rendered":"https:\/\/mobifeverlabs.in\/?p=776"},"modified":"2023-04-25T13:18:14","modified_gmt":"2023-04-25T12:18:14","slug":"googles-john-mueller-move-javascript-below-the-head-element","status":"publish","type":"post","link":"https:\/\/mobifeverlabs.in\/index.php\/2023\/04\/20\/googles-john-mueller-move-javascript-below-the-head-element\/","title":{"rendered":"Google\u2019s John Mueller: Move JavaScript Below The Head Element"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"776\" class=\"elementor elementor-776\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4df1310 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4df1310\" data-element_type=\"section\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-163d01e\" data-id=\"163d01e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-48a07b2 elementor-widget elementor-widget-image\" data-id=\"48a07b2\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.12.2 - 23-04-2023 *\/\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"810\" height=\"338\" src=\"https:\/\/mobifeverlabs.in\/wp-content\/uploads\/2023\/04\/js-job-1024x427-1.png\" class=\"attachment-large size-large wp-image-732\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/mobifeverlabs.in\/wp-content\/uploads\/2023\/04\/js-job-1024x427-1.png 1024w, https:\/\/mobifeverlabs.in\/wp-content\/uploads\/2023\/04\/js-job-1024x427-1-300x125.png 300w, https:\/\/mobifeverlabs.in\/wp-content\/uploads\/2023\/04\/js-job-1024x427-1-768x320.png 768w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b6c9012 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b6c9012\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-477c64d\" data-id=\"477c64d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3dd94c0 elementor-widget elementor-widget-text-editor\" data-id=\"3dd94c0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.12.2 - 23-04-2023 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>John Mueller from Google advises placing JavaScript code underneath the HTML element to ensure that search engines can clearly understand your website.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-876471a elementor-widget elementor-widget-text-editor\" data-id=\"876471a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p>Google\u2019s John Mueller suggests keeping the &lt;head&gt; HTML element section \u201cclean\u201d to ensure search crawlers can fully understand your website.<\/p>\n<p>Mueller shares this advice in a Reddit thread, where a user asks whether HTML code placement could cause SEO issues.<\/p>\n<p>The answer is yes; the placement of HTML code could adversely impact your SEO efforts if it doesn\u2019t appear at the top of the page.<\/p>\n<h3>A Note About Mueller\u2019s Remarks<\/h3>\n<p>John Mueller uses the term HTML Headers. But the &lt;head&gt; element isn\u2019t ordinarily referred to that way.<\/p>\n<ul>\n<li><em>HTML Headers<\/em>&nbsp;are generally understood (as informal jargon) to reference the &lt;heading&gt; element (H1, H2, H3, etc.).<\/li>\n<li><em>Header Elements<\/em>&nbsp;are a specific HTML element known as &lt;header&gt;, which contains the menu, logo, etc .<\/li>\n<li><em>Head HTML element<\/em>&nbsp;is a section at the top of the HTML document with metadata about the document itself (title, meta description, etc.).<\/li>\n<li>\n<p>So when Mueller references \u201cheaders\u201d he is specifically discussing the &lt;head&gt; element.<\/p>\n<h2>John Mueller on JavaScript in the Head Element<\/h2>\n<p>Mueller\u2019s intention was to stress the importance of keeping the &lt;head&gt; section of the HTML document tidy and uncluttered with scripts that can be placed elsewhere.<\/p>\n<div id=\"SEJ_300x250_UnderPost_1_i-parent\" class=\"content-unit sss2_sllo_o mmh-90-wrap\" data-total=\"4\">\n<div class=\"mmh-90-inner\">\n<div class=\"mmh-90 flex-aligner\">\n<p>The &lt;head&gt; element should only contain metadata about the document itself that is used by browsers and search engines, which helps search engines understand what the page is about and provides data to browsers and search engines for rendering the webpage properly (which means display it correctly).<\/p>\n<p>Some JavaScript code that can be placed after the &lt;head&gt; element should go after.<\/p>\n<p>After moving any JavaScript out of the &lt;head&gt; section, Mueller recommends using the rendering tool in Search Console to check if the page is rendering correctly after the move.<\/p>\n<p><b>\u201cThe html headers (&lt;head&gt;) should be pretty much on top. I\u2019d move any JS to below the HTML headers, and check with the rendering tool in search console that the JS<\/b><b> doesn\u2019t mess up the &lt;head&gt; section.\u201d<\/b><\/p>\n<p>Regarding the main content, Mueller says its placement is less important, though it\u2019s crucial for the &lt;head&gt; section to be clean and well-organized so Googlebot can properly understand it.<\/p>\n<p><b>\u201cFor the content it doesn\u2019t matter as much, but since the head stuff is for machine-readable information that\u2019s verified to be in a specific part of the page, it really needs to be clean on top.Down with JavaScript! (in the &lt;head&gt;)\u201d<\/b><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>John Mueller from Google advises placing JavaScript code underneath the HTML element to ensure that search engines can clearly understand your website. Google\u2019s John Mueller suggests keeping the &lt;head&gt; HTML element section \u201cclean\u201d to ensure search crawlers can fully understand your website. Mueller shares this advice in a Reddit thread, where a user asks whether [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":777,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/posts\/776"}],"collection":[{"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/comments?post=776"}],"version-history":[{"count":33,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/posts\/776\/revisions"}],"predecessor-version":[{"id":1418,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/posts\/776\/revisions\/1418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/media\/777"}],"wp:attachment":[{"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/media?parent=776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/categories?post=776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobifeverlabs.in\/index.php\/wp-json\/wp\/v2\/tags?post=776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}