HTML YouTube Videos

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.

  1. Upload video on YouTube.
  2. Note the Video ID of uploaded video.
  3. As this video id will be link through iframe tag so add <iframe> in webpage.
  4. Now you can set and width and height of video by giving height and width attribute in <iframe>.
  5. Add src attribute and write URL of video as its value.