Event-specific, user-provided code that is executed whenever the event is triggered. For example, if you want to play a sound whenever a button is clicked, you would write code to play the sound in the event handler for the button's click event.