Check out example codes for "create custum tage html". It will help you in understanding the concepts better.

Code Example 1

The 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.

var XTreehouseElement = document.registerElement('x-treehouse');
document.body.appendChild(new XTreehouseElement());

<x-treehouse></x-treehouse>

Code Example 2

The 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.

var XTreehouseElement = document.registerElement('x-treehouse');
document.body.appendChild(new XTreehouseElement());

<x-treehouse></x-treehouse>

Code Example 3

//HTML
<my-tag id="yourId" some-attr="someval"></my-tag>

//CSS
my-tag {
	color: red;
}

Learn ReactJs, React Native from akashmittal.com