How to Embed an MP4 Video in HTML

An alternative to uploading your MP4 video to video-hosting websites is to embed it into your site with HTML. This gives you more control over how the video is displayed on your site and what other content is shown alongside. By embedding your MP4 (or MPEG-4) video in HTML, you can also retain your own branding, since video-hosting sites place their own logos on videos that they host.

...
You can embed high-quality MP4 video in your website with HTML.

Step

Place your cursor at the point in your HTML code where you want to embed the MP4 video.

Step

Insert the following code:

Step

Step

Replace "videofilename.mp4" with the name of your MP4 video file. Remember to add ".mp4" after the filename. If your MP4 video is in a different folder from the one that contains the HTML file, enter the proper file path.

Step

Change all HEIGHT and WIDTH attributes in pixels, as needed. Change the AUTOPLAY attribute to "false" if you don't want the video to start automatically playing as soon as the webpage loads.