Skip to content
Related Articles
Open in App
Not now

Related Articles

How to insert video in web page and play it using HTML ?

Improve Article
Save Article
  • Difficulty Level : Hard
  • Last Updated : 10 Oct, 2022
Improve Article
Save Article

HTML allows playing video in the web browser by using <video> tag. To embed the video in the webpage, we use src element for mentioning the file address and width and height attributes are used to define its size.

Example: In this example, we are using <video> tag to add video into the web page. The video tag uses width, height, and control attributes to set the size and controls of video on web page. Also, use source tag with src attribute to add source of video.


<!DOCTYPE html>
<body style="text-align: center;">
    <h1 style="color: green;">
        How to insert video
        and play in HTML
        Adding Video on my Webpage
    <video width="500px" height="500px"
        <source src="vid.mp4"


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!