In HTML5, the video player is established with the video tag. The video file's location and media type is set within a source tag. Additionally, the height and width can be assigned to the video within the video tag. It may look something like this:
It is important to note that the video player has attributes: preload and Boolean. The preload values are: auto, metadata, and none. The Boolean attributes are: autoplay, controls, loop, and muted.
Additionally, there are file types. MPEG-4 (.mpg) are the most common and well-supported video format. Ogg Theora (.ogg) are an open-source format, but has some compatibility issues. Web Media (.webm) is similar to OGG but suffers from fewer compatibility issues and is more efficient in terms of file size versus quality.
We can now begin embedding a video.
To embed a video onto your website, use the iframe tag. This tag creates an element that contains content from another document, which includes PDFs and other websites.
For websites like YouTube and Vimeo, find a video you want displayed on your website.
Next, open that video and click "Share"
After this, a menu should pop up. Click "Embed".
Select your preferences for the embedding options.
Copy and paste the code provided into your HTML file.
You have finished embedding the video on your website. It should look like this: