HTML5 Daily Video Tags app

Source: Internet
Author: User

As with audio, in the past, if we wanted to play video on the web, it was all played via Flash, and not all browsers had Flash Player plug-ins installed, and now we're in HTML5, we can completely disengage from flash or other plugins to play the video.


Video Tags:

IE9 FireFox 5.0 Safari 5.5 Chrome 12 Opera 11.5
Mpeg4 X X
Ogg X X
WebM X X


ogg: Ogg file with Theora video encoding and Vorbis audio encoding
MPEG4: MPEG 4 files with the H. W video encoding and AAC audio encoding
WebM: WebM file with VP8 video encoding and Vorbis audio encoding



The properties of the video tag are:

" /td> value (can be omitted) description
src url The URL of the video to play, the path can be a network path or a relative path.
controls controls displays controls, such as play buttons, to the user.
loop Loop starts playing again at the end of the video.
preload preload The video loads when the page loads and prepares to play. If you use "autoplay", the property is ignored.
autoplay AutoPlay The video will play as soon as it is ready.
width autoplay The length of the video.
height autoplay The length of the video.


Note: The properties of video are basically the same as the audio properties, except for the width and height properties.



SOURCE Sub-label

This tag is used to specify the path of the video, the general existence of this sub-label can no longer appear in the video src attribute, in different browsers have different video support videos, then we want to be able to play in different browsers, there are a variety of video formats, Then we just need to add this tag to specify the video, and the browser will be the video format supported by the movie. The source has two properties, namely:

Property Describe
Src The URL of the video to play, the path can be a network path or a relative path.
Type Video type



    1. <video width= "" "height=" controls= "Controls" Autoplay= "true";
    2.         <source src= "http://ie.sogou.com/lab/inc/ Bigbuckbunny.mp4 "type=" Video/mp4 "/>
    3.         <source src=" http:/ IE.SOGOU.COM/LAB/INC/BIGBUCKBUNNY.OGV "type=" Video/ogg "/>
    4. </video>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.