$(function() { var e = $("p").parent(); e.css("border", "2px solid red"); }); <!--HTML------------------------ //Selects a parent element of the paragraph and sets a red border for it <div> div element <p>paragraph</p> </div> ---->