HTML5 CSS3 audio

Audio File format

File formatFile ExtensionDeveloped byOperating System
Real Audio.rm or .ramReal NetworksWin or Mac
Audio Interchange File Format.aiff or .aifAppleMac
Quick Time.movAppleWin (with Plug-in) or Mac
Sound.sndAppleMac
Wave Format.wavMicrosoft & IBMWin or Mac(with plug-in)
Au.au Win or UNIX or Mac
Moving Picture Expert Group(MPEG).mpg or .mpeg or .mp3 or .mpgaMoving Picture Expert GroupWin or Mac
Musical Instrument Digital Interface(MIDI).midi or .midLimited to instrumental music, cannot be used for soundsWin or Mac(with MIDI device)

HTML Play Audio file - mp3

1. External Media

Play music (first_noel.mp3) 3.84mb

HTML5 Embed element

AttributeDescription and Value
srcFile name of the media. (.mp3 or .swf)
typeThe MIME type of the object; use type="audio/mp3" or type="application/x-shockwave-flash"
widthSpecifies the width of the object area in pixels.
heightSpecifies the height of the object area in pixels.
bgcolorOptional: background color of the media. Using hexadecimal color value.
qualityOptional: describes the quality of the media, usually set to "high"
titleOptional: specifies a brief text description.
wmodeOptional: set to "transparent" to configure transparent background.

HTML5 audio element

AttributeValueDescription
srcfile nameOptional: audio file name
typeMIME TypeOptional: The MIME type of the audio file, such as audio/mpeg or audio/ogg
autoplayautoplayOptional: indicates whether audio should start playing automatically; use with caution
controlscontrolsOptional: indicates whether contols should be displayed; recommended
looploopOptional: indicates whether audio should be played over and over
preloadnone, auto, metadataOptional: values: none (no preload), metadata (only donwload media file metadata), and auto (download the media file)
titleOptional: specifies a brief text description.