getHTML

fun getHTML(options: GetHTMLOptions = definedExternally): String(source)

The getHTML() method of the Element interface is used to serialize an element's DOM to an HTML string.

MDN Reference