4

Given the following HTML:

<my-custom-tag>
    <a href="some-page.html">Some page</a>
    <a href="other.html">Other</a>
</my-custom-tag>

How do search engines typically parse tags like this? Is it typical practice to walk into custom tags like this one and parse the recognized one's like anchor's, or will it completely skip over the custom element and not find the anchor's?

Web components are already being used and it would be nice to have some clarification on how to properly utilize them without sacrificing SEO optimizations.

  • Your HTML is not parsed but analyzed using the DOM (document object model) which if you have done any object oriented (OO) programming would be second nature to you. Your custom tag would likely mean little to nothing, however, your tags within the custom tag would not be ignored. – closetnoc Jul 9 '17 at 18:13
2

Search engines analyse your source code to find identifiable information. In your example a search engine (i.e. Google) does understand that Some page and Other is content, linked to their specific href-attribute. It would still understand these links even if a closing </a>-tag would be missing.

It will not understand the semantic meaning of your <my-custom-tag> in any way other than a grouped element holding several pieces of information together.

Wether a search engine gives any weight to the grouping element or not, I cannot say with certainty.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.