Do you want insert (embed) video in your HTML project? then you land at the right place. Here We have posted the short code for you that you can use to embed video into HTML website. So let’s begin.
How to Embed Video in HTML
The following are the step to insert video.
Step 1. Open Code Editor
First of all open notepad or sublime or any other code editor that you have. And type basic HTML code.
Step 2. Copy Video Embed Code
Copy the following code into your HTML file. We have used here HTML 5 video embed code.
<video width="400" height="320" title="My video" > <source src="song.mp4" type="video/mp4"> </video>
Step 3: Modify the Video Code
Don’t forget to modify the video page source and title of the video as per your need.
Write down the video tag and inside the tag type, the attribute width and height give it value like 400px or 300px.
Attributes of the Video tag.
width: give the width of video for eg. like 400. It will be 400px automatically.
height: Give height of video for eg 300. It will make your video height 300px.
title: Give the title of your video so it will appear at the top of a video.
src: give the path and file name of the video.
Note: There is only 3 video file format support in video tag. That is Mp4, webm, ogg.
I hope you enjoy to learn this. If you have any problem in this post for improving please let me know. I will improve it.