Create an element

Create new element

const ele = document.createElement('div');

Create new text node

const ele = document.createTextNode('Hello World!');

More

Previous
Copy text to the clipboard
Next
Detect clicks outside of an element