Following your code:
$("p").click(function() {
// this function is the event handler of the "click" event
});
which is the same as:
$("p").on("click",function(){
alert("Which One is Event and which one Event Handler");
});
The following code, is not an event, just changes the style of the p
elements:
$("p").css("background-color", "yellow");