- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to embed a video using HTML code?
To embed a video in an HTML page, use the <iframe> element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately.
The Video URL is the video embed link. The video we will be embedding our example will be YouTube.
To get the embed link, go to a YouTube Video and click embed as shown below. You will get a link fro embed here −
You can try to run the following code to learn how to embed a video using HTML code. Copy the embed link as shown above and add it to the HTML document
Example
<!DOCTYPE html> <html> <head> <title>HTML Video embed</title> </head> <body> <p>Learn Eclipse</p> <br /> <iframe width="560" height="315" src="https://www.youtube.com/embed/y881t8ilMyc" frameborder="0" allowfullscreen></iframe> </iframe> </body> </html>
- Related Articles
- How to Share Embed YouTube Video Link for Blogs?
- How to embed JavaScript in HTML file?
- How to embed base64 images in HTML?
- HTML DOM embed object
- How to design a video slide animation effect using HTML CSS JavaScript?
- Recommended way to embed PDF in HTML?
- How to add video in HTML page?
- HTML 5 Video Buffering a certain portion of a longer video
- How do we embed custom data attributes on all HTML elements?
- How to include the audio/video controls in HTML?
- How to enable embed on YouTube channel using YouTube Mobile app?
- How to embed nodes in a JavaFX MenuItem?
- How to Download a YouTube video Using YouTube Premium
- How to rotate a video in OpenCV using C++?
- Accessing HTML source code using Python Selenium.

Advertisements