JSFiddle - React, Tailwind, and code Playground

HTML

<ul class="foo">
    <li>ABC</li>
    <li>DEF</li>
</ul>

JavaScript

var html = $( "ul.foo" ).html();
var nodes = $( html );