HTML Audio Tag
HTML audio tag is used to define sounds such as music and other audio clips. Currently there are three supported file format for HTML 5 audio tag.
- mp3
- wav
- ogg
HTML5 supports <video> and <audio> controls. The Flash, Silverlight and similar technologies are used to play the multimedia items.
This table defines that which web browser supports which audio file format.
Browser | mp3 | wav | ogg |
---|---|---|---|
Internet Explorer | yes | no | no |
Google Chrome | yes | yes | yes |
Mozilla Firefox | yes* | yes | yes |
Opera | no | yes | yes |
Apple Safari | yes | yes | no |
HTML Audio Tag Example
Let's see the code to play mp3 file using HTML audio tag.
Output:
Let's see the example to play ogg file using HTML audio tag.
0 Comments