1//HTML
2<my-tag id="yourId" some-attr="someval"></my-tag>
3
4//CSS
5my-tag {
6 color: red;
7}
1The document.registerElement() method is used to create a custom HTML element. This should be passed as the name of your custom element along with an (optional) object that defines the API.
2
3var XTreehouseElement = document.registerElement('x-treehouse');
4document.body.appendChild(new XTreehouseElement());
5
6<x-treehouse></x-treehouse>