

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 add a YouTube Video to your Website?
To add a YouTube Video to your website, you need to embed it. 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 Questions & Answers
- How to make embedded youtube videos look better on your website?
- How to Add Video to your Facebook Comment?
- How to download mp3 tracks from youtube video using youtube dl
- How to load YouTube video in a div using jQuery?
- PHP Regex to get YouTube Video ID
- How to Validate your Website Code?
- How to play YouTube video in my Android Application?
- How to create a favicon for your website?
- How to record your desktop screen with youtube
- How to Add Google Maps to a Website?
- How to create Favicon for your website?
- How to Prevent Your Website from Hackers?
- How android YouTube app Play Video from Intent
- How can I stop a video with JavaScript in Youtube?
- How to add a captcha in a Django website?
Advertisements