<!DOCTYPE html><html><head><title>Wikitechy onerror attribute</title></head><body><videowidth="320"height="240"controlsonerror="onError()"><sourcesrc="hibiscus.mp4"type="video/mp4"></video><script>functiononError()
{
alert("Wikitechy video could not be loaded");
}
</script></body></html>
Code Explanation for onerror Attribute in HTML:
<video> tag is used to display the video with controls.
The onerror attribute is used to call onError() JavaScript function if any error occurs during the file loading.
The JavaScript function onError is used to display an alert message.