-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description
Custom HTML Element
Custom HTML Element1 is introduced in HTML5, which allows user to create their own custom html element like
<my-custom-tag> </my-custom-tag>Use Case
it will be useful with the Typst html output feature (especially with html.elem), one can use it as a placeholder and do more post-processing in further process. for example, the
#html.elem("my-custom-tag")will produce <my-custom-tag> mentioned above. and one can use 3-rd party tools to replace it with html contents.2
However, currently, it is blocked by the naming check, the character "-" is not valid in a tag name error will be reported if you try to do this.
Footnotes
-
https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name ↩
-
Although you can use
<div>even<slot>withidornameattribute identifier, as a placeholder. but the custom elements are also necessary in my opinion ↩