TLDR Web Dev · ARTICLES & TUTORIALS
CUSTOM ELEMENTS DON'T REQUIRE A HYPHEN AS A SEPARATOR
Summary from the TLDR Web Dev newsletter
This author was initially confused about the rules for valid custom element tag names, as his Codepen tests with emojis failed due to a JavaScript error. After fixing the error, they realized that custom element tag names only need a hyphen, not necessarily as a separator. This means that tags like mytag- or h1- are valid, although using them might not be recommended.