CKTIS / HTML
video — embedding video
The `video` element embeds a movie, optionally with audio. It provides browser controls and lets you specify the media source.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<video src="movie.mp4" controls></video>video requires an end tag. Supply a file through src or alternative source elements, but not both approaches together. controls enables browser controls; their appearance can vary.
poster specifies a placeholder image. preload is a hint, not a download guarantee; autoplay does not guarantee automatic playback. Add captions through track. Fallback content inside video serves older browsers without element support: it does not replace captions or a transcript.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>video</title>
<video id="player" controls width="320" height="180"></video>
<pre id="result"></pre>
<script>
const player = document.getElementById('player');
document.getElementById('result').textContent =
`${player.localName}: controls=${player.controls}, width=${player.width}, height=${player.height}`;
</script>
</html>Result
video: controls=true, width=320, height=180
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.