There are many new things in HTML5, which are somewhat different from the old version. This article will describe the detailed analysis of the new audio elements in HTML5
HTML5 Audio(audio)
Last modified on August 1, 2017
HTML5 provides a standard for playing audio files.
Audio on the Internet
Until now, there was no standard for playing audio on web pages.
Today, most audio is played through plug-ins (such as Flash). However, not all browsers have the same plugins.
HTML5 specifies a standard for embedding audio elements on web pages, using the
Browser support
Internet Explorer 9, Firefox, Opera, Chrome, and Safari all support the
Note: Internet Explorer 8 and earlier IE Version does not support the
HTML5 Audio - How it works
To play audio in HTML5, you need to use the following code:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> </head> <body> <audio controls> <source src="/statics/demosource/horse.ogg" type="audio/ogg"> <source src="/statics/demosource/horse.mp3" type="audio/mpeg">
Your browsing The processor does not support the audio element.