JSFiddle - React, Tailwind, and code Playground
HTML
<button id="save">get content</button>
<div id="holder">
<div style="left:10px;top:20px;background-color:#000000;">hello</div>
<div style="left:10px;top:20px;background-color:#00ff00;">World</div>
<div style="left:10px;top:20px;background-color:#ff0000;">!</div>
</div>
CSS
#holder div
{
position: abolute;
width: 100px;
height:100px;
}
JavaScript
$('button#save').click(onButtonClick);
function onButtonClick()
{
content = $('#holder').html();
alert(content);
}