createElement

fun <T : HTMLElement> createElement(tagName: HtmlTagName<T>, options: ElementCreationOptions = definedExternally): T(source)

Creates an instance of the element for the specified tag.

Parameters

tagName

The name of an element.

MDN Reference


fun createElement(tagName: String, options: ElementCreationOptions = definedExternally): HTMLElement(source)