$(function() { $('div').append($('<strong> - append text</strong>')); $('p').append($('<strong>').attr('title', 'text title attr').text(' - append text with title attr')); });
<div>div</div> <p>paragraph</p>