Embedding Video

The <video> tag helps us to embed the required video into the webpage. The width and height properties determine the size of the video. The control property adds playback control like play, pause, volume. etc. The <source> tag specifies the specific video file and the type attribute is used to specify the MIME (Multipurpose Internet Mail Extensions) type. If the browser does not support a video tag then the content present inside will be displayed. Provide multiple video formats such as MP4, MOV, AVI, WEBM.. etc.

Example: Illustration of embedding video in an HTML Document.

HTML




<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,
                                   initial-scale=1.0">
    <title>Embedding video in HTML</title>
</head>
 
<body>
    <video width="500px" height="300px" controls>
        <source src="Small_movie.mp4" type="video/mp4">
        <source src="Small_movie.webm" type="video/webm">
        Your browser does not support this video tag.
    </video>
</body>
 
</html>


Output:

How to Embed Multimedia in HTML ?

A variety of tags such as the <img> tag, <video> tag, and <audio> tag are available in HTML to include media on your web page. Multimedia combines different media, such as images, audio, and videos. Users will have a better experience when multimedia is embedded into HTML. Early web browsers only supported text and were limited to a single font in a single color. However, later browsers introduced support for various fonts, images, and multimedia elements.

Note: Provide multiple video formats such as .wav, .mp3, .mp4, .mpg, .wmv, etc.

Similar Reads

Syntax:

// Embedding imageLogo// Embedding video// Embedding audio...

Embedding Image

The tag is self-closing because they don’t have a closing tag. The src attribute is the required attributes in the tag, it helps to specify the source URL. The alt attribute provides the alternative text to an image. If the image does not load up then this message will be displayed....

Embedding Video

...

Embedding Audio

The

Contact Us