What is the syntax to create a new HTML element?

syntax to create a new HTML element.

1 Like

Create the element using this code:
const element = document.createElement('<insert-html-element-name-here>')

Append the element to DOM:
document.body.append(element)

More here.