HTML Video and Audio Tutorial PDF

Summary

This document provides a tutorial on how to insert videos and audio files in HTML web pages.

Full Transcript

COMPUTER 5^TH^ MONTHLY TEST REVIEWER **Five reasons you should use video on your website -**Sharing information is about storytelling, and videos are a great way to share a story.-Videos keep people on your website longer and engage them with your content-People work with people, and video helps pe...

COMPUTER 5^TH^ MONTHLY TEST REVIEWER **Five reasons you should use video on your website -**Sharing information is about storytelling, and videos are a great way to share a story.-Videos keep people on your website longer and engage them with your content-People work with people, and video helps people get to know, like and trust you-Videos keep your audience interested, no matter your product or service-Videos are fast and convenient **A video file can be inserted into an HTML page in two ways:** 1. Using HTML **\** tag2. Using the **\** tag. **\** This tag does not need an ending/finishing tag. It works, mostly, the same as a tag for a photo. The HTML **\** tag is used to show a video on a web page. Add height and width attribute to specify the horizontal and vertical dimension of the the video player on web.![](media/image2.jpeg) **video**- tag in inserting a video**width**- attribute**height**- attribute**source**- tag in inserting a video using a video tag**src**- attribute in inserting a video The HTML \ ElementTo show a video in HTML, use the \ element: ![](media/image4.jpeg) The text between the \ and \ tags will only be displayed in browsers that do not support the \ element. HTML \ Autoplay To start a video automatically, use the autoplay attribute: Attributes of the embed tag **autostart** - sets whether the file will run automatically after the page is loaded. Can have the true or false value **hidden** - sets whether the buttons are hidden or not. Can have the true or false value. **volume** - can have any value from 0 to 100 **loop**- sets whether the file will be replayed after it is finished. Can have the true or false value. **playcount** - this establishes how many times the file will be replayed. For example playcount=\"2\" means it will be replayed two times and after it will stop. Syntax in inserting a video using \ **\** ![](media/image6.jpeg) **HTML AUDIO** The HTML **\** element is used to play an audio file on a web page. **Sample HTML Codes in Inserting an Audio** The controls attribute adds audio controls, like play, pause, and volume.The **\** element allows you to specify alternative audio files which the browser may choose from. The browser will use the first recognized format. ![](media/image8.png) Add muted after autoplay to let your audio file start playing automatically (but muted): Example: \**There are three supported audio formats: MP3, WAV, and OGG. The browser support for the different formats:** ![](media/image10.png)

Use Quizgecko on...
Browser
Browser