HTML VIDEO


Attributes we will look at elements <Video>

Attribute: src, autoplay, controls, loop, alt


Adding A Video

Handling video is very similar to handling audio

<video> adds a video to the web page, but doesn't play it

<video src="../assest/video/walk_video.mp4"></video>


Playing Video

Auto play makes the video start as soon as the page loads

<video src="../assest/video/walk_video.mp4" autoplay ></video>


Adding Video Controls

Add controls to give the user some video controls

<video src="../assest/video/walk_video.mp4" controls ></video>


Some Ways of Handling Video

Use loop if you want the video to repeat

<video src="../assest/video/walk_video.mp4" controls autoplay loop ></video>


Use Alt For Search Engines And Disabled People

<video src="../assest/video/walk_video.mp4" alt="Walking on the stairs" controls ></video>


Handle Older Browsers With A Message

<video src="../assest/video/walk_video.mp4">
<p>Sorry! Your browser does not support the <i>video</i> tag</p>
</video>

Sorry! Your browser does not support the video tag



Copyright © 2020. All rights reserved.