HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
  • Insights
  • Verify Certificate
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials

HTML5andCSS3.org helps developers learn modern frontend skills with practical tutorials, production-ready snippets, and fast web tools built for everyday coding.

Quick Links

  • About Us
  • Contact Us
  • Privacy Policy
  • Copyright
  • Disclaimer

Top Tools

  • Try It Editor
  • JSON Formatter
  • CSS Minifier
  • HTML Minifier
  • Base64 Encoder / Decoder

Contact

  • business@html5andcss3.org
Newsletter

Learn at your own pace, practice with useful tools, and build websites you're proud of.

© 2011-2026 html5andcss3.org. All rights reserved.

How to Use

HTML Tutorial

HTML Basics

Introduction to HTMLHTML EditorsHTML StructureHTML Elements & AttributesHTML HeadingsHTML ParagraphsHTML FormattingHTML CommentsHTML Styles

HTML Text and Links

HTML Text FormattingHTML Quotations & CitationsHTML LinksHTML Email Links

HTML Lists and Tables

HTML ListsHTML TablesTable Styling & Borders

HTML Images and Media

HTML ImagesHTML Picture ElementHTML AudioHTML VideoHTML Embed & Object

HTML Forms

HTML Forms OverviewHTML Form ElementsHTML Input TypesHTML Input AttributesHTML Form AttributesHTML Form Validation

HTML Layout

HTML Block vs Inline ElementsHTML Div & SpanHTML Semantic Layout TagsHTML Iframes

Advanced HTML

HTML Entities & SymbolsHTML EmojisHTML Head Element TagsHTML Meta Tags for SEOHTML Responsive Design

HTML References

HTML5 New TagsDeprecated TagsHTML Global AttributesEvent AttributesComplete HTML Tag ListComplete HTML5 ElementsHTML Tutorial PDF
  1. Home
  2. /
  3. Tutorials
  4. /
  5. HTML Tutorial
  6. /
  7. HTML Video

HTML Images and Media

HTML Video

The HTML <video> element allows you to embed videos directly on web pages without relying on external plugins. You can display movies, tutorials, animations, or any video content. <video> supports multiple formats, provides built-in controls, and can autoplay, loop, or be muted for a better user experience.

HTML <video> Syntax

HTML Video Example

html

<video controls>
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.mp4" type="video/mp4">
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.webm" type="video/webm">
  Your browser does not support the video tag.
</video>

Explanation

  • <video>: The container for video content.
  • controls: Displays standard video controls like play, pause, volume, and fullscreen.
  • <source>: Specifies video files and types. Multiple sources improve browser compatibility.
  • Fallback text: Displayed if the browser does not support the <video> element.

Attributes of <video>

  • controls: Shows video controls.
  • autoplay: Starts playing automatically when the page loads.
  • loop: Plays video repeatedly.
  • muted: Mutes the video initially.
  • poster: Displays an image before the video starts.
  • width / height: Sets the size of the video player.

Example with Multiple Attributes

html

<video width="640" height="360" controls autoplay muted loop poster="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_thumbnail.png">
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.mp4" type="video/mp4">
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.webm" type="video/webm">
  Your browser does not support the video tag.
</video>

Supported Video Formats

  1. MP4 - most widely supported across all browsers.
  2. WebM - modern, open-source format with good compression.
  3. OGG / OGV - older open-source format.

⚠️ Tip: Provide multiple formats to ensure all browsers can play your video.

Example: Complete HTML Video Player

HTML Video Complete Example

html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>HTML Video Example</title>
</head>
<body>

<h2>Watch Our Tutorial Video</h2>
<video width="640" height="360" controls poster="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_thumbnail.png">
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.mp4" type="video/mp4">
  <source src="https://ik.imagekit.io/html5andcss3/lesson-samples/sample_video.webm" type="video/webm">
  Your browser does not support the video tag.
</video>

<p>Enjoy the video directly in your browser with built-in controls!</p>

</body>
</html>

Advantages

  • Embed videos without third-party plugins.
  • Cross-browser support with multiple source formats.
  • Customizable playback with attributes like controls, autoplay, loop, and poster.
  • Enhances engagement and user experience on your website.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesPartially

Conclusion

The HTML <video> element allows seamless video integration for websites.
Using multiple formats, the controls attribute, and optional features like poster and autoplay ensures your content is accessible, engaging, and compatible across modern browsers.

Videos make your web pages dynamic, interactive, and professional, all without additional plugins.

PreviousHTML AudioNextHTML Embed & Object