Modify the DOM with html(), text(), val(), append(), prepend(), after(), and remove(). These work on all matched elements at once. Chaining lets you apply multiple operations in one readable line of code.
Changing the DOM
$('h1').text('Hello!'); // set text
$('p').html('Bold'); // set HTML
$('input').val('default'); // set value
$('body').append('
New
'); // add at end
$('ul').prepend('
First
');
$('#box').remove(); // delete element
$('#box').empty(); // clear contents