<html><head><script type="text/javascript" src="/jquery/jquery.js"></script><style> p, div { margin:5px; padding:5px; } .border { border: 2px solid red; } .background { background:yellow; }</style></head><body> <div> <p>First Paragraph</p> <p>Second Paragraph</p> </div><script> $("div").find("p").andSelf().addClass("border"); $("div").find("p").addClass("background");</script></body></html>