How to Insert Video Using HTML

Table of Contents
How to Insert Video Using HTML

In this article, I will provide 2 ways to insert videos using HTML, namely the <video> and <embed> script codes.

HTML is a markup language that functions to create a framework or design the appearance of a website.

How to Insert Video Using HTML

Video is a technology for sending electronic signals from a moving image. This video is a technology for capturing, recording, processing, transmitting and rearranging moving images. This video has no sound and some have sound (audio).

Video functions to watch, view, display visual images or designs that move based on the fps value in the speed of the image movement.

Insert a video using Tag video

1. The first step is to open a text editor such as Notepad++, Sublime, Visual Code and so on.

Type the script code below:

<html>
<head>
<title> Cara Menyisipkan Video Menggunakan HTML </title>
</head>
<body>
<h2 align="center">Cara Menyisipkan Video Menggunakan HTML Tag Video</h2>
<video width="400" controls>
  <source src="example.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>
</body>
</html>

2. Then save the script code above using CTRL+S

3. Save as desired, name it "exam-video.html"

4. Click save

How to Insert Video Using HTML

5. Find the file.

6. Then right click on the mouse open with Web browser app, here are the results.

How to Insert Video Using HTML

7. Done

Insert a Video using Tag embed

1. The first step is to open a text editor such as Notepad++, Sublime, Visual Code and so on.

Type the script code below:

<html>
<head>
<title> Cara Menyisipkan Video Menggunakan HTML Embed</title>
</head>
<body>
<h2 align="center">Cara Menyisipkan Video Menggunakan HTML Tag Embed</h2>
 <embed src="example.mp4" width="300" height="300" />
</body>
</html>

2. Then save the script code above using CTRL+S

3. Save as desired, name it "exam-video.html"

4. Save

How to Insert Video Using HTML

5. Find the file.

6. Then right-click on the mouse - Web Browser app, here are the results.

How to Insert Video Using HTML

This tag <embed> can insert flash video files (.swf). This <embed> tag can work in a web browser if the flash player plugin has been installed in the web browser.

However, there is often a blank display on the web browser. This <embed> tag can also embed regular videos like (.mp4).

If you are using an older version of the web browser application, you should insert a video using the <embed> tag, because the <video> tag can only use the latest version of the web browser application and only supports HTML5.

Now you can choose the script code to insert the video in the blog or websites. 

Note : Maybe the two video tag attributes above don't support certain video file extensions.

ANDD
ANDD Daily workers

Post a Comment