I have the following html5 code that display video:
<h2>Video from last year</h2>
<div class="video-controls" style="display: none">
When using the
<video> tag in `html5' is good practice to:
Include width and height attributes, to avoid that the video will flicker while loading.
Not every browser is able to use a specific format, so you need to add other formats too.
It is also usefull to put some text which will display if the browser is not capable to use the `video' tag.
<h2>Video from last year</h2> <video width="320" height="240" controls> <source src="my_video.mp4" type="video/mp4"/> <source src="my_video.ogg" type="video/ogg"/> <source src="my_video.webm" type="video/webm"/> We are sorry but your browser does not support the video tag. </video> </section>
You can also if you wish display an image as placeholder normally called 'poster'
<video width="320" height="240" controls poster="poster_image.png">
Old browsers do not support the `video' tag at all.