How To Insert Video In HTML? (With source Code)

Hey, may be you are learning HTML or web development and now you want to make websites. So I will help you to do some of your work. In this article I will tell you how to insert video in HTML.

I will also give you video tag in HTML and with source code to insert video in HTML web page.

So, lets start the process to insert video in HTML

Here I will provide you two ways to insert the video in HTML.

  1. Using the HTML 5 video element.
  2. By using Iframe.

Also read :-{How to hack WiFi}

1.Using HTML 5 Video element.

You must only change the title section to put your title and link section to add your video here

<!DOCTYPE HTML>
<HTML LANG="en">
<head>
<meta charset="utf-8">
<title>Title of video you want to give</title>
</head>
<body>
<video controls="controls">
<source src="link.mp4" type="video/mp4">
</video>
</body>
</html>

2. Using Iframe Element

You can use this code to embed video you can only change the title section and link section to get your video embedded.

<!DOCTYPE HTML>
<HTML LANG="en">
<head>
 <title>title of your video</title>
</head>
<body>
 <iframe width="560" height="315" src="link" frameborder="0" allowfullscreen></iframe>
</body>
</html>

This < object > element is used to embed different kinds of media files in a HTML document or page. Initially, this element was used to insert ActiveX controls, but according to this particular specification, an object can be any media object such as video, audio, PDF files, Flash animations or even images.

The following code line will embed a Flash video file into a web page which can be played live.

Example

Try this code ยป

<object data="media/blur.swf" width="400px" height="200px"></object>

Selected browser or applications who support Flash will only be able to play this clip.

How to insert video in HTML using notepad?

To insert video you can use the following steps…

  1. Type the one of the following code of HTML to embed in note pad.
  2. Now if you want to put video on full page and video as only content on your site.
  3. Then host that code on either local host or over internet.
  4. Or, If you want to embed video on a page with content then copy this code and paste on your webpage source.

How to insert video in html from folder?

You may have came across this question many time because every method you get is embedding the videos from youtube or other hosts.

But, you want to insert the video from your own PC directly.

And the surprising thing is that you have already seen the method. Yes, you have already seen the method to insert video and that method was first one where on the link section you have to insert the path of your video from my computer.

To check the path of video you can see the properties section of video by right clicking on the video.

Also read:- {Website security checklist}

Also read :-{Best wifi Hacking Apps}

Conclusion:-

In the conclusion of this post I will tell you the summary of this post.

I have given two methods to insert the video in HTML with the help of small amount of coding and copy paste.

In these two methods you have to copy the code and change the title of your video then insert the link of your video.

You must enter the link either it is from youtube or directly from your computer.

After all that i have included 2 different related to this article, which are:-

How to insert video in HTML using notepad?

How to insert video in html from folder?

As these topics are very close to this article so that’s why I added them to this post.

After writing all these things I am really tired and I hope you enjoyed this post.

Leave a Reply

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