Embedding video in HTML 5

Embedding video in HTML 5

Embedding video in HTML 5: Today’s web browsers support playing of video files without the use of flash player; however, the issue still remains regarding a common video file format for  inserting videos in HTML pages. Currently supported formats include H.264 and Ogg video formats. Let us now try to embed a video in an HTML 5 web page.

 

Step 1:

Let us begin with the basic code to insert a video file into our webpage:

<Video >

  </video>

Step 2: Now insert the location of your video file: the ‘src’ refers to the source video file.

<Video src = “song.ogg”>

  </video>

Step 3: Initiate the controls so that the user can see buttons for video control e.g. play, pause, sound and information about video: a sample image is displayed below which is the result of “controls” function inside the <video> </video> tag.

Play audio in HTML 5