As well as attributes, events can be defined in HTML tags. Events, instead of giving values to the elements like the attributes, trigger actions when they occurs. These actions are defined by client-side scripts that are programs written to perform some action in a specific language (e.g., JavaScript, VBScript, etc.). There are different events that occurs in different instances according to browsers or users actions.
The onload event occurs when the user agent finishes loading a window or all frames within a frameset.
The onunload event occurs when the user agent removes a document from a window or frame.
The onclick event is triggered when the mouse button is clicked over the element.
The ondblclick event occurs when the pointing device button is double clicked over an element.
The onmousedown event is triggered when the mouse button is pressed over the element.
The onmouseup event occurs when the pointing device button is released over an element.
The onmouseover event is triggered when the mouse is moved onto the element.
The onmousemove event occurs when the pointing device is moved while it is over an element.
The onmouseout event is triggered when the mouse is moved away from the element.
The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation.
The onblur event is triggered when an element loses focus either by the pointing device or by tabbing navigation.
The onkeypress event occurs when a key is pressed and released over an element.
The onkeydown event is triggered when a key is pressed down over the element.
The onkeyup event occurs when a key is released over an element.
The onsubmit event is triggered when a form is submitted.
The onreset event occurs when a form is reset.
The onselect event is triggered when a user selects some text in a text field.
The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus.