Google’s John Mueller Warns Against Custom Elements In Head


Recently, there was a discussion on Twitter about the validity of using custom elements in the

section of web pages.

Custom elements are part of the Web Components specifications, allowing developers to create HTML elements tailored to their needs.

Using custom tags, developers can build reusable and self-contained HTML elements that function independently from the rest of the code.

On Twitter, an individual asks: “Anyone know if it’s technically valid to have a custom element in the document head?”

John Mueller, a Search Advocate at Google, suggested that this practice could potentially disrupt how Google renders and indexes the page.

Mueller states:

“Using custom elements in the

likely breaks page rendering in Google Search. If there are ‘search’ meta tags, etc. below the custom elements that should be in the (like robots noindex), Google may not recognize them during rendering.”

Understanding How Google Renders Web Pages

To fully grasp the implications of Mueller’s statement, it’s important to understand how Google renders web pages.

You can think of a web page’s HTML as a recipe and resources like CSS, JavaScript, images, and videos as ingredients.

The rendering process is like cooking, transforming the recipe into the final product users see in their browsers.

As Google’s crawler retrieves the HTML, the rendering process begins by interpreting the code and assembling the resources to display the web page visually.

The SEO Implications Of Custom HTML Tags

While custom tags benefit developers, their impact on SEO cannot be ignored.

Custom tags can affect SEO because search engines like Google traditionally rely on standard HTML tags to understand a page’s content and structure.

For example, if a custom element is used in the

, Google may not recognize the standard tags that follow during rendering.

This could result in Google missing important meta tags relevant to SEO.

The Argument Against Using Custom HTML Tags

Although custom HTML tags offer flexibility, there are reasons to use them cautiously.

In addition to Mueller’s concerns, custom HTML tags can potentially cause compatibility issues with older browsers and screen readers.

There are also possible clashes in the global namespace and concerns about separating functionality, meaning, and presentation.

An Alternative: JSON-LD Tags

For those who want to improve SEO while retaining the flexibility of custom tags, JSON-LD tags are a promising alternative.

JSON-LD, or JavaScript Object Notation for Linked Data, provides a method for encoding Linked Data using JSON.

When structured properly, this data can be used in a

This makes it easier for search engines to interpret the content.

This script communicates key information about an organization to search engines, increasing the chances of the page ranking in relevant search results.

In Summary

While web development continues to change with exciting new tools, the impact of custom HTML tags on SEO is still being understood.

Those concerned about compatibility or SEO issues may prefer to use standard HTML tags or JSON-LD as alternatives.


Featured Image: Darko 1981/Shutterstock

!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js');

if( typeof window.sopp != "undefined" && window.sopp === 'yes' ){ fbq('dataProcessingOptions', ['LDU'], 1, 1000); } console.log('load_px'); fbq('init', '1321385257908563');

fbq('track', 'PageView');

fbq('trackSingle', '1321385257908563', 'ViewContent', { content_name: 'googles-john-mueller-warns-against-custom-elements-in-head', content_category: 'news seo' }); } });





Source link

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We Know You Better!
Subscribe To Our Newsletter
Be the first to get latest updates and
exclusive content straight to your email inbox.
Yes, I want to receive updates
No Thanks!
close-link

Subscribe to our newsletter

Sign-up to get the latest marketing tips straight to your inbox.
SUBSCRIBE!
Give it a try, you can unsubscribe anytime.