Why is it bad to use my tags ( <mytag></mytag> ) and my attributes without data-* in html ?

As for the tags, this is how the Yandex map is inserted:

enter image description here

Consequently, the question is why are they allowed, but not to us?

  • Attributes there are standard. And the tags are new, probably, so that the standard styles do not interfere, I don’t know. - user207618
  • So is using custom tags okay? - Kirpich643
  • Modern browsers eat and process them. But from the side of the standard I don’t know, but I’m looking for laziness :) html5rocks.com/en/tutorials/webcomponents/customelements - user207618
  • The use of such <mytag> tags is primarily invalid, but with the help of web components you can do so by <my-tag>, always with a hyphen. - Amandi

1 answer 1

There may be custom tags, this is not bad, the browsers calmly support them, but the default tags break the page into logical parts with the names that correspond to the content, this simplifies indexing, the robots understand the structure of the site, the best semantics. data I think also semantics, access in javascript and in css, how to get access without data in pseudo-element css is probably not possible.