Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <video> Tag


HTML <video> tag define a video like movie clip, video clip attach in document.

HTML5 Video tag you have following sample video files and these video files have to be in different web formats.

HTML <video> tag introduce in HTML5.


Video Formats

Format Type Description
MP4 "video/mp4" MPEG 4 file format with (H264 video codec + AAC audio codec)
WebM "video/webm" WebM file format with (VP8 video codec + Vorbis audio codec)
Ogg "video/ogg" Ogg file format with (Theora video codec + Vorbis audio codec)

Example-Code:

<video controls>
  	<source src="rolling_sample.mp4" type="video/ogg">
	<source src="rolling_sample.mp4" type="video/mp4">
	<source src="rolling_sample.mp4" type="video/webm">
Display this message, if your browser does not support video tag.
</video>
Online Try This Code Your Self....   »

Example-Result:


<video> tag Attributes

<video> tag support following special attributes.

Attributes Value Description
src "URL" define the specify video URL link.
autoplay "Autoplay" attach video will play automatic.
control "Control" attach video will play/stop/pause control.
height "Size" define the height of video.
widht "Size" define the width of video.

Dynamic Attributes

<video> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<video> tag supported following Event attributes.:

Attributes Value Description
onfocus "Java_script" element gets focus on object when script tobe run.
onblur "Java_script" element lose the focus on object when scrip tobe run.
onabort "Java_script" element gets aborted on object when script tobe run.
onchange "Java_script" element gets anytime change on object when script tobe run.
onbeforeunload "Java_script" element gets unloaded on object when scrip tobe run.
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.
onreset "Java_script" form has been reset when script tobe run.
onselect "Java_script" Select some content when script tobe run.
onsubmit "Java_script" form has been submitted when script tobe run.
onload "Java_script" object has load when script tobe run.
onchange "Java_script" allow to change the object when script tobe run.
onunload "Java_script" unload to the browser window when script tobe run.
ondrag "Java_script" element being dragged when script tobe run.
ondragend "Java_script" element being stop dragged when script tobe run.
ondragenter "Java_script" element being go target dragged when script tobe run.
ondragleave "Java_script" element being leave to target dragged when script tobe run.
ondragover "Java_script" element being over to target dragged when script tobe run.
ondragstart "Java_script" element being start dragged when script tobe run.
ondrop "Java_script" element being dropped when script tobe run.
onerror "Java_script" element error occurs when script tobe run.
onmessage "Java_script" element message display when script tobe run.
onerror "Java_script" element error occurs when script tobe run.
onmousewheel "Java_script" mouse wheel will be rotate when script tobe run.
onscroll "Java_script" scrollbar is scroll when script tobe run.
onresize "Java_script" element should be resize when script tobe run.
onselect "Java_script" all element content selected when script tobe run.
onstorage "Java_script" element should be store in target when script tobe run.