Edit in JSFiddle

<div >
<p> First paragraph</p>
</div>

<div >
<p> Second paragraph</p>
</div>

Output of text() method :
<p id="outputtext"> </p>

Output of html() method :
<p id="outputhtml"> </p>

var str1 = $('div').text();
$('#outputtext').text(str1);

var str2 = $('div').html();
$('#outputhtml').text(str2);