{"id":4842,"date":"2023-06-20T13:20:33","date_gmt":"2023-06-20T13:20:33","guid":{"rendered":"https:\/\/afreeurl.com\/?p=4842"},"modified":"2023-06-20T13:20:33","modified_gmt":"2023-06-20T13:20:33","slug":"googles-john-mueller-warns-against-custom-elements-in-the-head","status":"publish","type":"post","link":"https:\/\/afreeurl.com\/?p=4842","title":{"rendered":"Google&#8217;s John Mueller warns against custom elements in the head"},"content":{"rendered":"<p><\/p>\n<p>Recently, there was a discussion on Twitter about the validity of using custom elements in the <head> website section.<\/p>\n<p>Custom elements are part of the web component specification, allowing developers to create HTML elements tailored to their needs.<\/p>\n<p>Using custom tags, developers can create self-contained, reusable HTML elements that work independently from the rest of the code.<\/p>\n<p>On Twitter, one person asks, &#8220;Does anyone know if it&#8217;s technically valid to have a custom element in the document header?&#8221;<\/p>\n<p>John Mueller, advocate for Google Search, <a href=\"https:\/\/twitter.com\/JohnMu\/status\/1670835191852433409?s=20\" target=\"_blank\" rel=\"noopener\">suggested<\/a> that this practice could alter the way Google renders and indexes the page.<\/p>\n<p>Mueller states:<\/p>\n<p>&#8220;Using custom elements in the <head> probably breaks page rendering in Google Search.  If there are &#8220;search&#8221; meta tags, etc.  below the custom elements that should be there <head> (like noindex robots), may not be recognized by Google during rendering.&#8221;<\/p>\n<h2>Understand how Google renders web pages<\/h2>\n<p>To fully understand the implications of Mueller&#8217;s statement, it&#8217;s important to understand how Google renders web pages.<\/p>\n<p>You can think of a web page&#8217;s HTML as a recipe and resources like CSS, JavaScript, images and videos as ingredients.<\/p>\n<p>The rendering process is like cooking, transforming the recipe into the final product that users see in their browsers.<\/p>\n<p>As the Google crawler retrieves the HTML, the rendering process begins by interpreting the code and gathering the resources to visually display the web page.<\/p>\n<h2>The SEO implications of custom HTML tags<\/h2>\n<p>While custom tags benefit developers, their impact on SEO cannot be ignored.<\/p>\n<p>Custom tags can affect SEO because search engines like Google traditionally rely on standard HTML tags to understand the content and structure of a page.<\/p>\n<p>For example, if a custom element is used in the file <head>Google may not recognize the standard tags that follow during rendering.<\/p>\n<p>This could cause Google to miss important SEO-relevant meta tags.<\/p>\n<h2>The argument against using custom HTML tags<\/h2>\n<p>Although custom HTML tags offer flexibility, there are reasons to use them with caution.<\/p>\n<p>In addition to Mueller&#8217;s concerns, custom HTML tags can cause compatibility issues with older browsers and screen readers.<\/p>\n<p>There are also potential global namespace clashes and concerns about separating functionality, meaning, and presentation.<\/p>\n<h2>An alternative: JSON-LD tags<\/h2>\n<p>For those looking to improve SEO while retaining the flexibility of custom tags, JSON-LD tags are a promising alternative.<\/p>\n<p>JSON-LD, or JavaScript Object Notation for Linked Data, provides a method for encoding linked data using JSON.<\/p>\n<p>When properly structured, this data can be used in a <script> tag of type application\/ld+json to provide structured metadata about the page.<\/p>\n<p>This makes it easier for search engines to interpret the content.<\/p>\n<p>This script communicates key information about an organization to search engines, increasing the chances of the page ranking in relevant search results.<\/p>\n<h2>In Summary<\/h2>\n<p>While web development continues to change with exciting new tools, the impact of custom HTML tags on SEO is still being understood.<\/p>\n<p>Those concerned about compatibility or SEO issues may prefer to use standard HTML tags or JSON-LD as alternatives.<\/p>\n<p>Featured Image: Darko 1981\/Shutterstock<\/p>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><br \/>\n<br \/>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/www.searchenginejournal.com\/googles-john-mueller-warns-against-custom-elements-in-head\/489737\/\" target=\"_blank\" rel=\"noopener\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, there was a discussion on Twitter about the validity of using custom elements in the website section. Custom elements are part of the web component specification, allowing developers to create HTML elements tailored to their needs. Using custom tags, developers can create self-contained, reusable HTML elements that work independently from the rest of the code. On Twitter, one person asks, &#8220;Does anyone know if it&#8217;s technically valid to have a custom element in the&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4842","post","type-post","status-publish","format-standard","hentry","category-seo-news"],"_links":{"self":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/4842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4842"}],"version-history":[{"count":0,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/4842\/revisions"}],"wp:attachment":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}