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

6 Best Online Grocery Apps for Android in India

All of us know that the revolution brought by technology is very amazing and the interesting fact about the...

5 Best Android apps for doctor appointments in India

We all have to visit doctors either frequently or within small to big gaps for every small and big...

Best Android Racing Games on Speed Boats and Ships

No doubt that there is an ocean of games available in our favourite store and this the time when...

Differences between a laptop and a notebook PC

When it comes to portable computers both laptops and notebooks are the two most popular, and available choices for...
- Advertisement -

Why you shouldn’t root your Android handset in 2020?

Everybody wants to get the most out of their smartphones as a smartphone is always a costly investment, and...

Best Free video conferencing software in 2020 during Covid19

In 2020, the usage of video conferencing solutions or websites, for both companies and individual has been surged up...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you