5 ms·
I'm out of touch, I guess. Can I just use any tags with ordinary HTML? Is it correct HTML?
by vbezhenar 2y ago
I'm out of touch, I guess. Can I just use any tags with ordinary HTML? Is it correct HTML?
- debugnik 2y agoYou can use any tag name with a hyphen, IIRC.
- fhd2 2y agoYes, though I personally don't use it, a weird fear of colliding with obscure existing or new tags down the line. But technically, name spacing them with a prefix should cover that.
- skrebbel 2y agoYep. The standard promises that new standard tags will never contain a dash, so if your custom tag does contain a dash, it can’t ever clash with future new browser features.
- beardyw 2y agoThe "data" prefix, followed by whatever you want, has been formalised for quite some time. The DOM provides a "dataset" property.