O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Controls and Autoplay to Your Video

So far, I’ve shown you the simplest possible method for adding video to your Web page, and the video in that example will not even start playing, because we haven’t told it to. Also, if the browser you view this code sample in doesn’t support the video file format you’re using, then the browser will display either an empty rectangle (at 300 x 150 if dimensions haven’t been specified) or the poster image, if one is indicated (via the poster attribute).

The short code sample in “Adding a Single Video to Your Web Page” won’t add any controls to the video, but you can do so easily enough Image.

Adding a single ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required