3 ms·
Yes you can do that and it will work. But for future-proofing you should use tag names with a dash in them (like <foo-whatever>) to avoid colissions if html add
by bazoom42 3y ago
Yes you can do that and it will work. But for future-proofing you should use tag names with a dash in them (like <foo-whatever>) to avoid colissions if html adds an official <whatever> element in the future. (The html standard promises to never add an element with a dash in its name)
- graypegg 3y agoJust to note the reasoning why they've promised that because I thought it was kinda interesting: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name https://html.spec.whatwg.org/multipage/custom-elements.html#... Tag names with at least one hypen and two words either side are reserved for custom element use... with a few exceptions that I assume were part of the HTML/svg/mathml spec before the custom element registry. - annotation-xml - color-profile - font-face - font-face-src - font-face-uri - font-face-format - font-face-name - missing-glyph