Audio and Video Tag

Audio and Video Tag

HTML Video Tag

HTML 5 supports <video> tag also. The HTML video tag is used for streaming video files such as a movie clip, song clip on the web page.

Currently, there are three video formats supported for HTML video tag:

  1. mp4

  2. webM

  3. ogg

note :- Android also supports mp4 format.

Let's see the table that defines which web browser supports video file format.

<video controls>  
  <source src="movie.mp4" type="video/mp4">  
  Your browser does not support the html video tag.  
</video>

Attributes of HTML Video Tag

Let's see the list of HTML 5 video tag attributes.

HTML Audio Tag

HTML audio tag is used to define sounds such as music and other audio clips. Currently there are three supported file format for HTML 5 audio tag.

  1. mp3

  2. wav

  3. ogg

HTML5 supports <video> and <audio> controls. The Flash, Silverlight and similar technologies are used to play the multimedia items.

This table defines that which web browser supports which audio file format.

<audio controls>  
  <source src="koyal.mp3" type="audio/mpeg">  
Your browser does not support the html audio tag.  
</audio>

Schitts Creek Comedy GIF by CBC

credits :-

Jacob + Katie Schwarz

https://www.javatpoint.com/html-audio

https://www.javatpoint.com/html-video