From http://www.w3schools.com (Copyright Refsnes Data)
The <audio> tag defines sound, such as music or other audio streams.
The <audio> tag is new in HTML 5.
Tip: You can write text inside the start and end audio tags, to show older browser that they do not support this tag.
Source | Output |
---|---|
<audio src="horse.wav"> Your browser does not support the audio element. </audio> |
Attribute | Value | Description |
---|---|---|
autoplay | true | false | If set to true, the audio will start playing as soon as it is ready. |
controls | true | false | If set to true, the user is shown some controls, such as a play button. |
end | numeric value | Defines where in the audio stream the player should stop playing. By default, it plays to the end. |
loopend | numeric value | Defines where in the audio stream the loop should stop, before jumping to the start of the loop. Default is the end attribute's value. |
loopstart | numeric value | Defines where in the audio stream the loop should start. Default is the start attribute's value. |
playcount | numeric value | Defines how many times the audio should be played. Default is 1. |
src | url | Defines the URL of the audio to play |
start | numeric value | Defines where in the audio stream the player should start playing. By default, it plays from the beginning. |
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title |
For a full description, go to Standard Attributes in HTML 5.
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload |
For a full description, go to Event Attributes in HTML 5.
From http://www.w3schools.com (Copyright Refsnes Data)