Here is the code to embed video in html or WordPress post

- Advertisment -
- Advertisement -

Here is the simple iFrame code to embed any video on an HTML page or WordPress post/page, just what you need is the URL of the video you want to embed.

Most of the times we embed videos from Youtube or platforms like it, where we can easily get the embed code, however, what about videos without embed code. I mean if you only have URL of some particular video available online and want to display on your website’s HTML or WordPress page. Thus, we are here with this post, in which we not only provide you with the <iFrame> element code but also let you know how to control the height and width of the embedded video.

Here is the code: 

<iframe width="560" height="315" src="https://videolink" frameborder="0" allowfullscreen>
</iframe>

The above code is the same which you find while copying embedded code of any video from Youtube. Now to use it on WordPress Post.

Just go to your post or page and click on the Text section.

Embed video on WordPress post or page using iframe code 2

Paste the above-given code and replace the https://videolink with the Video link which you want to show on your page or post.

In the same way, open the HTML page where you want to embed video and copy-paste the above link with the replacement of video link.

Change the height and width of the video.

To resize the embed video window as per your need, we just have to increase or decrease two values given in the iFrame code, that are:

  • width=”560″
  • height=”315″

Change the values of the elements in the above given to get the appropriate size of the video.

If you are learning HTML coding then here is simple code to embed and show your video from the internet or local machine.

<!DOCTYPE html>
<html>
<head>
<title>My project</title>
</head>
<body>
<p>Code to embed videos</p>
<br />
<iframe width="560" height="315" src="https://replace-this-video-link" frameborder="0" allowfullscreen></iframe>
</body>
</html>

So, this is a simple method to display any videos from different sources on website pages. Here is one more important tutorial which surely helps you in future: How to embed google drive video without iframe in WordPress or blog.

 



H2S Media Team
H2S is a group of tech enthusiasts those are passionate about latest technology developments. They always like to solve own technical problems and share the same solution with others through this Website.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts

How to split and break files on a Windows computer using HJSplit

We all come across files that are a few Gigabytes or Terrabytes in size. We can easily back them...

How to install Akaunting on Windows 10

Akaunting software which is a free and open-source web-based application for finance & accounting purposes. Here we will see...

Future of the Gaming Industry in India 2020

With the population of 1.3billions, India automatically becomes the biggest market for any industry if even...

How to install IIS web server on Windows 10 Step by Step

IIS (internet information services manager) on Windows 10/7 Desktop or server is basically a flexible and secure Web server...
- Advertisement -

How to assign labels to emails on Google Mail or Gmail to organize emails

We get hundreds of emails every single day, and among all that we get, only a handful of them,...

Top 10 myths related to technology that you should stop believing

Today, when we talk about tech, the 90’s kids and the Millenials mostly refer to the latest smartphones, LED...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you