WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML5 Audio


In this part we learn standard for playing sound file.


Audio on the Web

It is a standard for playing for playing sound records on a Web pages.

It's Audio record play superb sound.It isn't look like blaze

The HTML5 <audio> component indicates a standard method to implant sound in a web page.


Browser Support

In this table indicate the main program form that completely bolsters the <audio> element.

Element
<audio> 4.0 9.0 3.5 4.0 10.5

The HTML <audio> Element

Play a sound record in HTML you should utilize the <audio> element:

Example

<audio controls>
  <source src="gta5_ifruit_ringtone.ogg" type="audio/ogg">
  <source src="gta5_ifruit_ringtone.mp3" type="audio/mpeg">
Your program does not bolster the sound element.
</audio>
Try it yourself »

HTML Audio - How It Works

The controls ascribe use to controls, similar to play, delay, and volume.

Text between the <audio> and </audio> labels will show in programs that don't support the <audio> element.

Multiple <source> components can connection to distinctive sound documents. You will utilize the principal perceived format.


HTML Audio - Browser Support

Currently, there are 3 upheld record designs for the <audio> component: MP3, Wav, and Ogg:

Browser MP3 Wav Ogg
Internet Explorer YES NO NO
Chrome YES YES YES
Firefox YES YES YES
Safari YES YES NO
Opera YES YES YES

HTML Audio - Media Types

File Format Media Type
MP3 audio/mpeg
Ogg audio/ogg
Wav audio/wav

HTML Audio - Methods, Properties, and Events

HTML5 are different DOM techniques, properties, and occasions for the <audio> element.

This enables you to load, play, and delay sounds, just as set term and volume.

There are additionally DOM occasions that can inform you when a sound starts to play, is delayed, etc.

For a full DOM reference, go to our HTML5 Audio/Video DOM Reference.


HTML5 Audio Tags