JSFiddle - React, Tailwind, and code Playground

JavaScript

alert($('<div>').append($('<abc/>').append('<x/>')).html());