1 / 7

HTML 5 Tutorial

HTML 5 Tutorial. Chapter 4 Audio. Audio. The HTML 5.0 specification allows us playing sound using the <audio> element. The <audio> element can play sound files or an audio stream. The HTML 5.0 specification aims at supporting the following sounds formats: MP3, WAV and Ogg Vorbis. Format.

Download Presentation

HTML 5 Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML 5 Tutorial Chapter 4 Audio

  2. Audio The HTML 5.0 specification allows us playing sound using the <audio>element. The <audio> element can play sound files or an audio stream. The HTML 5.0 specification aims at supporting the following sounds formats: MP3, WAV and Ogg Vorbis.

  3. Format Until now, there has never been a standard for playing audio on a web page. Today, most audio are played through a plugin (like flash). However, not all browsers have the same plugins. Currently, there are 3 supported audio formats for the audio element:

  4. Basic Syntax Basic Syntax to Embed Video : <audio src="music.ogg" controls="controls"> *Content we place in between the tags will be displayed when the browser doesn't support playing audio</audio> The control attribute is for adding the play, pause and volume controls

  5. Basic Syntax The audio element allows multiple source elements. Source elements can link to different audio files. We can add the <source>child elements in between the audio element tags. The browser will use the first supported format. <audio controls="controls"> <source src="mymusic.ogg" type="audio/ogg"> <source src="mymusic.mp3" type="audio/mpeg"> browser does not support html 5.0 </audio>

  6. Attribute The HTML 5.0 supports the following attributes :

  7. Reference Hickson, I. (Eds.). (2011). HTML Living Standar. Retrieved from http://www.whatwg.org/specs/web-apps/current-work/multipage/ World Wide Web Consortium. (n.d.). HTML 5 Tutorial. Retrieved from http://www.w3schools.com/html5/default.asp

More Related