Create a new HTML tag named <hello-world>
that will display "Hello, World!":
<script>
//define a class extending HTMLElement
class HelloWorld extends HTMLElement {
connectedCallback () {
this.innerHTML = 'Hello, World!'
}
}
//register the new custom element
customElements.define( 'hello-world', HelloWorld )
</script>
<!-- make use the custom element -->
<hello-world></hello-world>