Video in html

The <video> tag allows you to embed video files in your webpage, with controls for playing, pausing, and adjusting the volume.

Basic Video Example

<video controls width="600">
    <source src="video.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

<video> Tag Attributes

AttributeDescriptionExample
srcSpecifies the video file URL<video src="video.mp4"></video>
controlsDisplays video controls (play, pause, volume)<video controls>
autoplayStarts playing the video automatically (must be muted for autoplay to work)<video autoplay muted>
loopRepeats the video after it ends<video loop>
mutedStarts the video without sound<video muted>
posterSpecifies an image to show before the video starts playing<video poster="thumbnail.jpg">
widthSets the width of the video (in pixels)<video width="600">
heightSets the height of the video (in pixels)<video height="400">
playsinlineEnsures the video plays inside the browser on mobile (instead of full screen)<video playsinline>
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz