html tutorial - onprogress Attribute in HTML - html5 - html code - html form

Onprogress attribute in html

Learn html - html tutorial - Onprogress attribute in html - html examples - html programs

  • The onprogress attribute defines a script to be run when the browser is downloading the specified audio/video.
  • During the loading process of an audio/video, the following events occur in this order: onloadstart, ondurationchange, onloadedmetadata, onloaded data, onprogress, oncanplay, oncanplaythrough.
  • The onprogress attribute is part of the Event Attributes.

Syntax for onprogress attribute in HTML:

<element onprogress=”script”>

Applies To:

Element Attribute
<audio> onprogress
<video> onprogress

Attribute Values:

Value Description
script The script can run on onprogress

Sample Coding for onprogress Attribute in HTML:

Tryit<!DOCTYPE html>
         <title>Wikitechy onprogress attribute</title>
       <audio id="myAudio" controls onprogress="onProgress()">
       <source src=" welcome.wav" type="audio/wav">
       <source src="welcome.mp3" type="audio/mp3">
       function onProgress()
        alert("The Wikitechy audio has started downloading");

Code Explanation for onprogress Attribute in HTML:

onprogress Attribute Code Explanation

  1. The <audio> tag is used to embed the audio in HTML.
  2. The onprogress attribute is used to run “onProgress()” when the audio file is being downloaded.
  3. The function onProgress() function is used to activate the alert box with message when the onprogress event is activated.

Output for onprogress Attribute in HTML:

onprogress Attribute Tag Output

  1. The alert box will appear when the audio file being progress.

Browser Support for onprogress Attribute in HTML:

Yes 9.0 Yes Yes Yes

Related Searches to onprogress Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.