how to put html inside jquery text

JavaScript
var itemtoReplaceContentOf = $('#regTitle');
itemtoReplaceContentOf.html('');
newcontent.appendTo(itemtoReplaceContentOf);$('div.demo-container').html('<p>All new content. <em>You bet!</em></p>');
Source

Also in JavaScript: