video

The video HTML element is used for playing videos or movies, and audio files with captions.

Syntax

HTML

<video attribute-name="attribute-value"></video>

Attributes

Global

Name Value Description
autoplay autoplay | empty Automatically play when the page is loaded
controls controls | empty Display the controls
height non-negative integer Vertical dimension
loop loop | empty Instructs the UA to seek back to the start of the audio stream upon reaching the end
mediagroup string Instructs the UA to link multiple videos and/or audio streams together
muted muted | empty Represents the default state of the audio stream, potentially overriding user preferences
poster URI Address of an image file for the UA to show while no video data is available
preload auto | empty Hints to the UA that optimistically downloading the entire audio stream is considered desirable
metadata Hints to the UA that the user is not expected to need the audio stream, but that fetching its metadata (duration and so on) is desirable
none Hints to the UA that the user is not expected to need the audio stream, or that minimizing unnecessary traffic is desirable
src URI URL for the audio stream
width non-negative integer Horizontal dimension

Examples

1 · autoplay

2 · controls

3 · height

4 · loop

5 · mediagroup

6 · muted

7 · poster

8 · preload

9 · src

10 · width

!doctype

a

abbr

address

area

article

aside

audio

b

base

bdi

bdo

blockquote

body

br

button

canvas

caption

cite

code

col

colgroup

data

datalist

dd

del

details

dfn

dialog

div

dl

dt

em

embed

fieldset

figcaption

figure

footer

form

h1

h2

h3

h4

h5

h6

head

header

hgroup

hr

html

i

iframe

img

input

ins

kbd

label

legend

li

link

main

map

mark

menu

meta

meter

nav

noscript

object

ol

optgroup

option

output

p

param

picture

pre

progress

q

rb

rp

rt

rtc

ruby

s

samp

script

section

select

slot

small

source

span

strong

style

sub

summary

sup

table

tbody

td

template

textarea

tfoot

th

thead

time

title

tr

track

u

ul

var

wbr

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu