JSFiddle - React, Tailwind, and code Playground

HTML

<form id="myform">
    <input type="text" name="something" />
</form>

JavaScript

alert($("#myform")[0].outerHTML);