Skip to content
Related Articles

Related Articles

Improve Article

HTML onpause Attribute

  • Last Updated : 06 Aug, 2021

The HTML onpause Attribute is a event attribute which when the Audio has been paused by the user or it will be automatically paused or stop.

Usage: This attribute is used in <audio> and <video> Tags.

Attribute Value: This attribute contains single value script which works when onpaused event attribute call. This attribute is supported by <audio> and <video> tags.


<element onpause="myScript">



<!DOCTYPE html>
        HTML onpause Attribute
    <h1 style="color:green">
    HTML onpause Attribute
 <video controls id="geeks">
            <source src="Geekfun.mp4"
        var aud =
        aud.onpause = function() {
            alert("video is paused now");


Supported Browsers: 

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

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :