Categories
HTML

How to Insert MP4 Video in HTML

Spread the love

Inserting MP4 videos in our HTML code is easy.

All we have to do is to use the video tag as follows:

<video src='https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_640_3MG.mp4' controls></video>

We have the controls attribute to show the video play controls in our video element.

src has the path to the video. It can be either a URL or a relative path.

Once we have that, we’ll see the video displayed with the play button on the bottom left.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *