Is there a way to create an element like with JavaScript?

I’m using this website https://ionic.io/ionicons to add icons to my buttons and is pretty simple with HTML when declaring a new element (that will encorporate the icon). You just have to declare a button and then put this inside it: ion-icon name="trash-outline"></ion-icon> .
However I don’t know how to create that icon element with javascript because I have to use .createElement at some point in order to make a button appear on the webpage.
Any idea?

I tried the below and it did not work:

let dltButton = document.createElement('button');
    dltButton.innerHTML = "<ion-icon name="trash-outline"></ion-icon>";

is not an official HTML tag, is it? So I assume that is why JS can’t create it.