How to work with HTML video

Move over YouTube... with the <video> element and a little JavaScript, you can start to create your own video site. The video element is fairly straightforward to use, but the real power comes when you combine it with JavaScript, which gives you a high level of control over the player’s behaviour. 

In this tutorial, we cover the basic setup of a video, selecting files to play back, and generating thumbnails. Not your thing? Use a website builder to create a site with no code, and explore your web hosting options.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Simon Jones

Simon Jones is a technology leader with experience managing product and engineering teams of up to 200 staff, both at startups and large corporates. He is a proficient full-stack developer, in particular with Go & React + TypeScript. He now works at Facebook in London. Formerly CTO at Norwegian VC-backed startup Just, and Engineering Director at Barclays and American Express.

Read more
A desktop with a colourful portfolio on screen
How to create an online portfolio: Steps to curating your own corner of the web
404 pages: LEGO
The best 404 pages for clever web design inspiration
An Aardman animator works his magic on set of the Wallace and Gromit stop motion movie
Stop-motion animation: everything you need to know
The logos of the best software for editing videos for YouTube on a blue background
The best software for editing videos for YouTube
Blender tutorials
22 Blender tutorials to boost your 3D modelling and animation skills
Three logos of the best website builders for photographers.
The best website builder for photographers: build an online home for your images
Latest in Videography
How to make GIF&#039;s using shortcuts
How to make a GIF on iPhone or iPad
Premiere Pro AI feature shown at MAX
Premiere Pro's new tools are exactly what AI should be used for
Two kittens and a Canon camera
Canon's new VR cat video is ridiculously cute
An image from a Yorkshire Water video compared with stock footage
Another company is in troubled waters after a silly stock video gaffe
A screenshot from LumaFusion for iOS
LumaFusion for iOS review: multicam editing gives video app a pro toolset
A screenshot from DaVinci Resolve Studio 18.5 on a computer screen
DaVinci Resolve Studio 18.5 review: video editor takes another step forward
Latest in How to
After Effects lightning tutorial
How to use Adobe After Effects to create a lightning effect the easy way
Venusaur art
How to paint Pokémon's Venusaur in Photoshop
Babiru DaVinci Resolve colour tips; a red creature in armour, it has a large toothy grin, in the background is a cyberpunk style city
How to achieve a bold cinematic look in animation, using DaVinci Resolve and Fusion Studio
Making Babiru, DaVinci Resolve and Unreal Engine; A tense and visually striking digital scene showcases a character poised with a glowing knife just before a dramatic confrontation, evoking themes of danger and anticipation in a cyberpunk environment.
Colour grading advice: how DaVinci Resolve Studio and Fusion Studio were harnessed for Babiru
Gesture drawing: all you need to know plus ways to practise in 2 and 5 minutes
How to draw a male figure