HTML: Custom Tag (Custom Element)
The HTML standard has a concept of custom element. That is, any arbitrary tag (with some naming requirement), like this
<abc-xyz>custom element</abc-xyz>
you can use CSS to define its appearance and use JavaScript to define its behavior.
Custom element name requirement
All characters must be lowercase.
- Start with lowercase a to z
- Followed by zero or more simple Unicode character
- Followed by a hyphen
- Followed by zero or more simple Unicode character
the “simple Unicode character” includes Emoji 😄
![custom element name spec 2022-08-24 cSgM4](i/custom_element_name_spec_2022-08-24_cSgM4.png)
![HTML spec custom element name 2022-08-24](i/HTML_spec_custom_element_name_2022-08-24.png)
Reference
https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements
![HTML spec Custom Element 2022-08-24 6dNbf](i/HTML_spec_Custom_Element_2022-08-24_6dNbf.png)