25 ms·
Custom HTML tags are valid HTML. Note the requirements for custom tags to always include a '-' in their names. This distinguishes custom tags from native ones.
by mediumdeviation 10y ago
Custom HTML tags are valid HTML. Note the requirements for custom tags to always include a '-' in their names. This distinguishes custom tags from native ones. https://html.spec.whatwg.org/#valid-custom-element-name https://html.spec.whatwg.org/#valid-custom-element-name
- kuschku 10y agoWill the browser be able to display them without requiring JS? If no, then it can't really be argued to be valid HTML by itself.
- ohyoutravel 10y agoYes, the article specifically states this.
- demircancelebi 10y agoThe article says "without relying on a JS framework.", which is different than not requiring JS. It does not work when Javascript is disabled.
- solidr53 10y agothey wont display what the javascript code tells them to display, but rather fallback to a <div /> mode.
- tomatsu 10y ago> Will the browser be able to display them without requiring JS? Without JS (which registers the element), custom element tags will be like any other unknown tag. It's like a span unless the CSS says otherwise. The behavior will be missing, however.