HTML video tags embed playable movies onto the page.
Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0
Introduction
HTML uses the `
Syntax
Syntax
1<!-- video syntax -->2<videocontrols>3<sourcesrc="vid.mp4"type="video/mp4">4</video>
Example
Example
1<!-- this embeds a video -->2<!DOCTYPEhtml>3<htmllang="en">4<head>5<metacharset="UTF-8">6<metaname="viewport"content="width=device-width, initial-scale=1.0">7<title>Video</title>8</head>9<body>10<videowidth="320"height="240"controls>11<sourcesrc="movie.mp4"type="video/mp4">12</video>13</body>14</html>
Try it Yourself
Hands-on Practice
Modify the code below to see how it affects the output. This is the best way to learn!
Interactive Editor
1234567891011121314151617181920
Live Preview
Key Points
The `
The `controls` attribute enables user interaction.
The `autoplay` attribute starts playback immediately.