Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

HTML onsuspend Attribute

  • Last Updated : 06 Aug, 2021

The HTML onsuspend is a event attribute which occurs when the browser not getting media data. This event occurs when the media loading is suspended. This can happen when the download has completed, or it has been paused because of some interruption. 

Usage: It is used in <audio> and <video> Tags,

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.


<element onsuspend="Script">

Attribute Value: This attribute contains single value script which works when onsuspend event attribute call



<!DOCTYPE html>
        HTML onsuspend Attribute
        <h1 style="color:green">GeeksforGeeks</h1>
        <h2>HTML onsuspend Attribute</h2>
        <audio controls id-"audioID">
            <source src="beep.mp3" type="audio/mpeg">
            "audioID").addEventListener("suspend", GFGfun);
        function GFGfun() {
                "Media loading suspended");


Supported Browsers: 

  • Google Chrome
  • Internet Explorer
  • firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :