YouTube Videos in HTML add karna web pages par videos show karne ka sabse easy tareeka hai. YouTube Videos in HTML ki madad se aap bina video file host kiye directly YouTube se video play kar sakte hain.
The video we will be using in the examples:
https://www.youtube.com/watch?v=a3ICNMQW7Ok
Struggling with Video Formats?
Videos ko different formats mein convert karna thoda difficult aur time-consuming ho sakta hai. Iska easy solution hai ki YouTube Videos in HTML use karein aur YouTube ko hi apni web page par video play karne dein.
YouTube Video ID
Jab aap YouTube par koi video save ya play karte ho, to YouTube ek unique ID show karta hai (jaise: abC123XyZ).
Aap is ID ka use karke YouTube Videos in HTML ke through apne HTML code mein video refer kar sakte ho.
Playing a YouTube Video in HTML
Web page par YouTube Videos in HTML play karne ke liye ye steps follow karein:
-
Video ko YouTube par upload karein
-
Video ki ID note karein
-
Apni web page mein
<iframe>element define karein -
srcattribute ko video URL par point karein -
widthaurheightattributes se player ka size set karein -
Zarurat ho to URL mein extra parameters add karein
Example:

YouTube Autoplay + Mute
Agar aap chahte ho ki page open hote hi video automatically start ho jaye, to URL mein autoplay=1 add karte hain. Lekin automatically video start hona visitors ke liye annoying ho sakta hai.
Note: Chromium based browsers zyada cases mein autoplay allow nahi karte. Lekin muted autoplay hamesha allowed hota hai.
Agar aap chahte ho ki YouTube Videos in HTML automatically chale lekin sound band rahe, to autoplay=1 ke baad mute=1 add karein.
Example:

YouTube Playlist
Agar aap ek se zyada videos play karna chahte ho, to comma separated list use kar sakte ho jo original URL ke saath add hoti hai. Is tarah YouTube Videos in HTML ke through playlist bhi embed ki ja sakti hai.
YouTube Loop
Agar aap chahte ho ki video baar-baar chalta rahe, to playlist=videoID aur loop=1 add karein.
-
loop=0(default) – Video sirf ek baar chalega -
loop=1– Video continuously loop hota rahega
Example (Loop Forever):

YouTube Controls
Agar aap video player ke controls hide karna chahte ho, to controls=0 add karein.
-
controls=0– Player controls show nahi honge -
controls=1(default) – Player controls show honge
Example:
