HTML and CSS Reference
In-Depth Information
itemtype="microdata type in URL format"
lang="language code"
media="media type"
spellcheck="true | false"
src="URL of media resource"
style="style information"
tabindex="number"
title="advisory text"
type="MIME type of linked media">
HTML5 Event Attributes
onabort, onblur, oncanplay, oncanplaythrough, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended,
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Element-Specific Attributes
media This attribute defines the intended media type of the linked media source, to
provide a hint to a user agent as to whether the media referenced is appropriate or how it
might be used. It is similar to the idea of a media attribute in a style sheet specifying print ,
screen , projection , or other common values.
src This attribute is set to the URL of the media source to link to.
type This attribute is set to the MIME type of the linked media file specified by the src
attribute. Often it also includes a codecs value to indicate how a media resource is
encoded. However, the use of codecs, as alluded to in Chapter 2, is a bit of a mess under
HTML5 so page authors are urged to test carefully.
Examples
<!-- Multiple sources to try -->
<audio>
<source src="angus.ogg">
<source src="angus.mp4" type="audio/mp4">
</audio>
<!-- XHTML style -->
<video>
<source src="angus.mp4" type="video/mp4; codecs='avc1.58A01E, mp4a.40.2'" />
</video>
Compatibility
HTML5
Firefox 3.5+, Safari 3.1+
Search WWH ::




Custom Search