August 21, 2022 · 2 min · 272 words · Christopher Brown
Table of Contents
HTML5 introduces built-in media support via the
The main advantage of the
Until now, there has not been a standard for playing audio files on web pages. What you commonly find on websites is that audio files are played through external plug-ins such as flash or other third party audio components. HTML5 defines this new element which now provides a standard way to embed audio within a web document.
Internet Explorer 9, Firefox, Opera, Chrome, and Safari support the
HTML5 has DOM methods, properties, and events for the element. These methods, properties, and events allow you to manipulate element using JavaScript. You can use methods for playing, pausing, and loading the videos. There are also DOM events that can notify you when the audio begins to play, is paused, and/or has ended, for example.