Getting a video on webpage

Before we know how to get a video on the webpage, I would like to tell you the potential uses for adding video to a website.

  • Educational content.

  • Marketing and advertising.

  • Entertaining and engaging visitors.

  • providing customer support.

    Improving SEO.

How to get a video on a webpage

there are two ways to get a video on a webpage

  <video src="./Christmas - 141964.mp4" controls autoplay width="600px" height="400px" muted></video>
<video width="600px" height="400px" controls>
    <source src="./Christmas - 141964.mp4">
    <source src="./Pine - 142579.mp4">
   </video>

Firstly we don't need a <source> tag but in a second way, we need a <source> tag .there are a lot of attributes used in the <video> tag I will explain later.first of all, know what the difference is between both the tag. we can't add two src attributes on the first <video> tag now why do we need two video sources on a single video tag, there are chances that the 1st video may not work so if the 1st video is not working second will work.

why do we use controls, autoplay and muted?

Controls are used for giving the control to the user to pause the video, forward the video and increase the volume without the control attribute user can't get the features of controlling the video.

autoplay is used for autoplay the video user needn't require to play the video it will play automatically.

In some webpages, volume is not required so developers use muted attributes to mute the video.