$('h1')// Find all the <h1> tags$('ul')// Find all the <ul> tags$('ul li:last-child')// Find the last <li> tags inside <ul> tags$('.tri')// Find everything with the class of `.tri`
JavaScript
var $h1 =$('h1');// Store a reference to the HTML element
$h1.html('Dinosaurs rock!');// Change the HTML inside the <h1>$('ul li:last-child').remove()// Delete and HTML element$('ul').append('<li>Apatosaurus</li>');// Add HTML to the end of the elementvar $newLi =$('<li>');// Make a new HTML tag, notice the `<>`
$newLi.html('Diplodocus');$('ul').prepend($newLi);// Add HTML to the start of an element
$h1.addClass('mega');// Add a class to the HTML element
$newLi.hasClass('dino');// Checks if a class exists$('ul li').each(function(){// Loop over a bunch of HTML elements$(this).addClass('kilo');// $(this) is the current HTML element});