0% found this document useful (0 votes)
5 views

Module-9-Different-types-of-Multimedia-Lecture-Copy

The document discusses various types of multimedia formats used in HTML documents, including images, audio, and video. It explains how to embed videos and audio using the <video> and <audio> elements in HTML5, along with attributes like controls and autoplay. Additionally, it highlights the use of the <source> element for specifying alternative media files for better browser compatibility.

Uploaded by

kiofujiwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Module-9-Different-types-of-Multimedia-Lecture-Copy

The document discusses various types of multimedia formats used in HTML documents, including images, audio, and video. It explains how to embed videos and audio using the <video> and <audio> elements in HTML5, along with attributes like controls and autoplay. Additionally, it highlights the use of the <source> element for specifying alternative media files for better browser compatibility.

Uploaded by

kiofujiwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

DIFFERENT TYPES OF

MULTIMEDIA
IN HTML DOCUMENTS
Module 9
Multimedia
comes in many different formats.

Examples: Images, music, sound,


videos, records, films, animations, and
more.
Common Video formats
Common Audio Formats
HTML5 Video

Before HTML5, a video


could only be played in a
browser with a plug-in
(like flash).
The HTML5 <video>
element specifies a
standard way to embed a
video in a web page.
The HTML <video> Element
To show a video in HTML, use the <video> element:
Example syntax for video with controls attribute:
<video width="600" height="400" controls>
<source src="video.mp4" type="video/mp4">
</video>
The controls attribute adds video controls, like play, pause,
and volume.

The <source> element allows you to specify alternative


video files that the browser may choose from. The browser
will use the first recognized format.

The text between the <video> and </video> tags will only
be displayed in browsers that do not support the <video>
element.
HTML <video> Autoplay

To start a video automatically use the autoplay attribute:

Example syntax for video with autoplay attribute:


<video width="600" height="400" autoplay>
<source src="video.mp4" type="video/mp4">
</video>
HTML5 Audio
To play an audio
file in HTML, use
the <audio>
element:
Example syntax
for Audio:

<audio controls>
<source
src="audio.mp3"
type="audio/mpeg
">
</audio>
The controls attribute adds audio controls, like play, pause, and
volume.

The <source> element allows you to specify alternative audio files


that the browser may choose from. The browser will use the first
recognized format.

The text between the <audio> and </audio> tags will only be
displayed in browsers that do not support the <audio> element.

You might also like