To embed video in an HMO five document we can use the video element inside the element.
We can set various attributes first.
We can set the width and height using fixed dimensions or percentage
in this example.
We have the width set of six hundred pixels so you can see that the video with stays at six hundred
pixels regardless of the browser window size
if we set it to 100 percent
the video will take up the full content area of the web browser.
We can use the controls attribute to specify if we want the user to be able to see the control menu.
This includes the play button the progress bar the volume and full screen controller if you do not want
the controls.
Simply remove the controls attribute
after receiving the file you can see that the controller is no longer there.
Remember to add an auto play attribute
if you remove the controls.
Otherwise the video will not play automatically in your user will have no way to play the video or save
the following refresh and you can see that the video now starts automatically.
The auto play attribute does not work in mobile devices like iPods and iPhones.
So that is something to keep in mind.
The video element requires that we specify the source of the video.
We've included a demo video you can use in the downloads folder corresponding to this lesson.
Just make sure that you place the video in the same directory that you've saved this HMO file into
the video is titled Why a dot.
MP for
next to this source we've specified the video type and underneath the source tag it's a good idea to
notify the user if their browser does not support the video tag.
That way you will know to update their browser and lastly close the video tag and so as you can see
it's very easy to work with this element.