25 Program to demonstrate Audio and Video Element in HTML

Program:
<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>HTML Audio & Video</title>

    <style>

        body{

            font-family: Arial, sans-serif;

        }

    </style>

</head>

<body>



    <!-- Audio Element -->

    <audio controls>

        <source src="horse.ogg" type="audio/ogg">

        <source src="horse.mp3" type="audio/mpeg">

        Your browser does not support the audio tag.

      </audio>



    <!-- Video Element -->

    <video width="320" height="240" controls>

        <source src="movie.mp4" type="video/mp4">

        <source src="movie.ogg" type="video/ogg">

        Your browser does not support the video tag.

      </video>

</body>

</html>


Output:
Audio and Video Element in HTML

Previous
Next Post »