Most event handler content attributes can be used on all HTML elements, but some event handlers have specific rules around when they can be used and which elements they are applicable to.įor more detail, see HTML event handler content attributes.
Each event handler content attribute deals with a different event.
The script is invoked when a certain "event" occurs. Event HandlersĮvent handler content attributes enable you to invoke a script from within your HTML. Therefore, you can use these attributes with the tag, as well as with all other HTML tags.įor a full explanation of these attributes, see HTML 5 global attributes. This works regardless of whether the user clicked on the link, or JS code initiated it without user interaction.
The following attributes are standard across all HTML elements. Allows downloading files through an or element with the download attribute, as well as through the navigation that leads to a download of a file.Specifies the height of the inline frame.
Whether the iframe's contents are allowed to use the Payment Request API to make payment requests. The HTML