Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM Audio play() Method

  • Last Updated : 14 Apr, 2021

The HTML DOM Audio play() method is used to start playing the current audio. To use the Audio play() method, one must use the controls property to display the audio controls such as play, pause, seeking, volume, etc, attached to the audio. This method is used together with the pause() method.

Return Value: 

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

  • No return value


  • No Parameter



<!DOCTYPE html>
        DOM Audio play( ) Method
<body style="text-align:center">
    <h1 style="color:green">
    <h2 style="font-family: Impact">
    Audio play() method
    <audio id="idAudio">
        <source src=
        <source src=
      Your browser does not support the audio element.
<p>To play the Audio, click the "Play Audio" button.</p>
    <button onclick="play_Audio()" type="button">Play Audio</button>
    <button onclick="pause_Audio()" type="button">Pause Audio</button>
        var GFG = document.getElementById("idAudio");
        function play_Audio() {
        function pause_Audio() {


Supported Browsers: 

  • Chrome
  • Mozilla Firefox
  • Internet Explorer 9.0
  • Opera
  • Safari


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!