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 |
---|---|---|---|
![]() | yes | no | no |
![]() | yes | yes | yes |
![]() | yes* | yes | yes |
![]() | no | yes | yes |
![]() | 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