Audio and Video Tag

Audio and Video Tag

·

1 min read

today's blog teaches you what the tag in HTML to add video and audio

For audio we use

opening tag and closing tag in the audio tag, you also provide src=" " because without src audio does not play so remember that in the audio tag also provide controls using controls you can increase volume and decrease also and you fast forward audio using controls and you see the audio timeline and in controls you also mute the audio and so many functions provide and in audio also provide type in audio tag

Screenshot 2022-11-29 at 3.19.52 PM.png

Let now discuss the video tag

in the video tag we provide opening and closing and also provide src in the video tag it is mandatory that without src tag video does not play and you can also provide controls in the video tag so you can control video there is the same feature in audio tag

Screenshot 2022-11-29 at 3.25.29 PM.png

Audio Tag

<audio controls>
  <source src="monkey.ogg" type="audio/ogg">
  This is an audio tag 
</audio>

Video Tag

<video width="320" height="240" controls>
  <source src="red_notice.mp4" type="video/mp4">
   This is a video tag
</video>