SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction to HTML5 Audio Element: Playing Sound on the Web

elvis-jensen avatar
7 diapositives · 249 Views · Nov 18, 2014

This chapter of the HTML5 tutorial covers the audio element, which allows users to play sound files and audio streams directly in web pages. With support for formats like MP3, WAV, and Ogg Vorbis, the audio element replaces the need for plugins like Flash, ensuring broader compatibility across different browsers. The tutorial includes syntax for embedding audio with controls for play, pause, and volume, and discusses using multiple source elements to provide various audio formats for the best user experience.

Introduction to HTML5 Audio Element: Playing Sound on the Web - slide 1
01 / 7Introduction to HTML5 Audio Element: Playing Sound on the Web
1 / 17

Télécharger la présentation

Introduction to HTML5 Audio Element: Playing Sound on the Web
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  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