It can be hard and time consuming to convert videos to various formats So, a simple alternative is to let the YouTube play videos in your webpage.
YouTube ID
When you save or play a video YouTube will show an ID you can use this ID to make a reference of video in html page.
Example: ID (ZYSX2-CQQ5k)
Linking YouTube Video in HTML
For playing YouTube video on webpage the following steps need to be followed.
- Upload video on YouTube.
- Note the Video ID of uploaded video.
- As this video id will be link through iframe tag so add <iframe> in webpage.
- Now you can set and width and height of video by giving height and width attribute in <iframe>.
- Add src attribute and write URL of video as its value.