Code for Adding a Video / YouTube Video in HTML Website Page

HTML5 Video Code

Before HTML5, a video could only be played in a browser with a plug-in (like flash).

The HTML5 <video> element specifies a standard way to embed a video in a web page.

HTML <video> Tag

The controls attribute adds video controls, like play, pause, and volume.

HTML <video> Autoplay Attribute

To start a video automatically use the autoplay attribute.

HTML Embed YouTube Videos

Adding/Embedding a YouTube Video in HTML Webpage.

YouTube Autoplay – https://www.youtube.com/embed/abcdefghij?autoplay=1

YouTube Playlist – https://www.youtube.com/embed/abcdefghij?playlist=abcdefghij

YouTube Loop – https://www.youtube.com/embed/abcdefghij?playlist=abcdefghij&loop=1

YouTube Controls – https://www.youtube.com/embed/abcdefghij?controls=0

Leave a Comment

Your email address will not be published. Required fields are marked *

3 + 16 =