You’re learning HTML and wish to place a video item on your page. In this post we will see how to load and play a video from a local video file and remotely via a URL.
SOLUTION
Using the <video> tag. It has an opening and closing tag.
Inside it we can use nested tags like <source> to specify the source of the video file and the type.
Also on the video tag we can specify via its attributes to show player controls or not. Let’s see a simple example of loading a local mp4 file.
The video file is titled example.mp4.
I will create a directory video example and place the video file inside.
Then I’ll create the video.html file with the following contents.