Easy Tutorial
❮ Att Td Headers Att Textarea Placeholder ❯

HTML onblur Event Attribute

HTML Event Attributes

Example

Validate when the user leaves the input field:


Browser Support

All major browsers support the onblur event attribute.


Definition and Usage

The onblur event is triggered when an element loses focus.

Onblur is commonly used for code validation (when a user leaves a form input field).

Tip: The opposite of the onblur attribute is the onfocus attribute.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Value

Value Description
script Script to be run when the onblur event is triggered

❮ Att Td Headers Att Textarea Placeholder ❯