×
   ❮     
HTML CSS MySql Javascript SQL PYTHON JAVA C++ C# BOOTSTRAP REACT XML NODEJS ANGULAR DJango Rust Android VUE
     ❯   

HTML Video


How to insert Video in HTML?

HTML video element is used to show a video on a web page.

Web video is a short, recorded, viewable file linked to a website or an electronic message to educate or transfer visual information from one user to another.

The HTML Video Element

To show a video in HTML, use the video element:

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Embedded Video</title>
    <style>
      body {
        font-family: 'Arial', sans-serif;
        text-align: center;
        margin-top: 50px;
        font-size: 18px;
      }

      video {
        width: 70%;
        display: block;
        margin: auto;
        margin-top: 20px;
        border: 2px solid #3498db; /* Blue color for video border */
        border-radius: 5px;
      }
    </style>
  </head>

  <body>
    <video width="600" height="400" controls>
      <source src="video/foreverinlove.mp4" type="video/mp4">
      Your browser does not support the video tag.
    </video>
  </body>
</html>
Try it Yourself »

Hey there! Let's go for Learn fasta then! It is more than just coding; it is to have the superpower that can solve any problem. Through simple and easy-to-grasp examples you will sail through the learning process. In addition, it is not just about coding– you will acquire competencies on how to solve complex problems, analyze data, and come up with efficient solutions. Shall we start this wonderful journey together! learnfasta.com terms of use, Copyright 2025 All Rights Reserved.