XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / source
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
source
HTML 5 |
HTML: <source>; XHTML: <source/> or <source />
Used with audio and video elements. Authors can use it to provide multiple versions of a media file. When source is used, the attribute src in audio and video elements should not be used. In this case, user agents (browsers) use the first playable file in the list of source elements.
Notes
HTML 5 only.
Start/end tag
This is an empty element. In the XML syntax of HTML 5, it must end with a slash before the closing angle bracket.
Attributes
media="all|aural|braille|handheld|print|projection|screen|tty|tv"Specifies the media types for which the audio or video file is intended.
src="URL"Defines the location of the audio or video file.
type="MIME-Typ"Specifies the media file’s type and can also include the MIME parameter
codecs=, which can specify the method used to encode the file.
Example
<video>
<source src="media/vacation.ogv" type="video/ogg; codecs='theora, vorbis'">
<source src="media/vacation.mp4" type="video/mp4">
Dieses <code>video</code>-Element wird von Ihrem Browser nicht unterstützt.
</video>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de