HTML/Training/Video

From W3C Wiki
< HTML‎ | Training
Revision as of 23:30, 21 February 2013 by Shik (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

HTML Videos

<video controls src="movie.ogv">
  <p>Your user agent does not support the HTML5 Video element.</p>
</video>


Embedded videos

The embedded videos are specified by <video>.
There are two way of specifying the embedded content.


See also The video element.

The src attribute

The image given by the src attribute is the embedded content.
SRC stands for source.

 <video src="movie.ogv">
 </video>

The source element

The <source> element allows authors to specify multiple alternative media resources for media elements.

 <video>
   <source src="movie.mp4" type='video/mp4; codecs="avc1, mp4a"'>
   <source src="movie.ogv" type='video/ogg; codecs="theora, vorbis"'>
 </video>

Video01.png


See also The source element.


Fallback contents

The fallback contents are contained between <video> ... </video>.

 <video src="movie.ogv">
   <p>Your user agent does not support the HTML5 Video element.</p>
 </video>


Video codecs

The HTML5 specification does not require a video codec to be supported by all user agents.

See the wikipedia browser support table.


In the next content, you will learn the HTML tables. "Tables"