onload Attribute

The onload attribute is an event handler attribute. It "triggers" and calls the code in its value "immediately after a page or an image is loaded", meaning this event handler should only be used with <body> and <img /> (w3schools.com). See w3schools and event handler attribute for some more examples.


See also: Attributes and Nesting Quotes

Back to Knowledge Dump