Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

source

The <source> element is used to designate one or more media resources for media elements like <audio> or <video>.

Code Example

<audio controls="controls" autoplay="autoplay" loop="loop"> <source src="track1.mp3" type="audio/mpeg"> <source src="track1.wav" type="audio/wav"> <source src="track1.oga" type="audio/ogg"> </audio>

Attributes

globals - the global attributes common to all elements possible values: see global attribute list src - specify the path to the media file possible values: "path/to/file" type - specify the source type possible values: "valid MIME type"

Official Documentation

http://www.w3.org/TR/html/embedded-content-0.html#the-source-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr