Events allow you to write a javascript code that reacts to certain situations. They are actions detected by javascript. Every element on a web page has certain events that can trigger a javascript code.
Events are usually used in a combination with functions. Hence, functions will not be executed until the event occurs.
In order to execute functions on the occurrence of certain events, event handlers are provided in javascript
They start with the prefix 'On'. Each event handler deals with a certain type of event.