HTML events can trigger actions in a browser.
For example, we can use the onClick event of a button element to indicate that a function will
run when a user clicks on the button. We define the events in the HTML tags.
Examples of events:
In the following example, Content of the h1 element will change when a user clicks on it:
You can also add the script in the head section, and then call a function from the event
For all HTML events, look at our complete HTML DOM Event
onmousedown and onmouseupChange
an image when a user holds down the mouse button.
onloadDisplay an alert
box when the page has finished loading.
Your Query was successfully sent!