what is multimedia
multimedia is the use of different types of media to convey information or entertainment. it can include text, images, audio, video, and interactive elements. multimedia is often used in education, advertising, and entertainment to create engaging and interactive experiences for users.
video element
the video element is used to embed video content in a web page. it allows you to specify the source of the video, as well as various attributes such as controls, autoplay, and loop. the video element is supported by most modern web browsers and can be used to display a wide range of video formats.
- src: Specifies the URL of the video file.
- controls: Displays native browser controls (play, pause, volume, etc.).
- autoplay: Causes the video to start playing automatically as soon as it can. Note: Most browsers require muted for autoplay to work.
- muted: Silences the audio output of the video by default.
- loop: Causes the video to automatically restart from the beginning when it finishes.
- poster: Sets an image URL to be shown while the video is downloading or until the user clicks play.
- preload: Hints to the browser how to load data: none (no buffering), metadata (load duration/dimensions), or auto (load whole file).
- playsinline: A boolean attribute that forces the video to play within the browser viewport on mobile, rather than forcing fullscreen.
use of all attributes in it :-
<video src="video.mp4" controls autoplay muted loop poster="poster.jpg" preload="auto" playsinline>
Your browser does not support the video tag.
</video>
audio element
the audio element is used to embed audio content in a web page. it allows you to specify the source of the audio, as well as various attributes such as controls, autoplay, and loop. the audio element is supported by most modern web browsers and can be used to play a wide range of audio formats.
- src: Specifies the URL of the audio file.
- controls: Displays native browser controls (play, pause, volume, etc.).
- autoplay: Causes the audio to start playing automatically as soon as it can. Note: Most browsers require muted for autoplay to work.
- muted: Silences the audio output by default.
- loop: Causes the audio to automatically restart from the beginning when it finishes.
- preload: Hints to the browser how to load data: none (no buffering), metadata (load duration), or auto (load whole file).
use of all attributes in it :-
<audio src="audio.mp3" controls autoplay muted loop preload="auto">
Your browser does not support the audio tag.
</audio>
embed element
the embed element is used to embed external content, such as multimedia or interactive applications, into a web page. it can be used to embed a wide range of content types, including videos, audio files, flash animations, and more. the embed element is supported by most modern web browsers and can be used to enhance the user experience on a web page.
- src: Specifies the URL of the resource to be embedded.
- type: Specifies the MIME type of the resource being embedded.
- width: Sets the width of the embedded content.
- height: Sets the height of the embedded content.
- name: Assigns a name to the embedded content, which can be used for scripting or referencing.
use of all attributes in it :-
<embed src="content.swf" type="application/x-shockwave-flash" width="400" height="300">
object element
the object element is used to embed external content, such as multimedia or interactive applications, into a web page. it can be used to embed a wide range of content types, including videos, audio files, flash animations, and more. the object element is supported by most modern web browsers and can be used to enhance the user experience on a web page.
- data: Specifies the URL of the resource to be embedded.
- type: Specifies the MIME type of the resource being embedded.
- width: Sets the width of the embedded content.
- height: Sets the height of the embedded content.
- name: Assigns a name to the object, which can be used for scripting or referencing.
- form: Associates the object with a form element, allowing it to submit data as part of a form submission.
use of all attributes in it :-
<object data="content.swf" type="application/x-shockwave-flash" width="400" height="300">
<param name="movie" value="content.swf">
</object>
track element
the track element is used to specify text tracks for media elements like video and audio. it allows you to provide subtitles, captions, or other types of text-based information that can be displayed alongside the media content. the track element is supported by most modern web browsers and can be used to improve accessibility and user experience for multimedia content.
- src: Specifies the URL of the track file (e.g., subtitles or captions).
- kind: Defines the type of text track (e.g., subtitles, captions, descriptions, chapters, or metadata).
- srclang: Specifies the language of the track text using a BCP 47 language tag (e.g., "en" for English).
- label: Provides a user-readable title for the track, which can be displayed in media controls.
- default: A boolean attribute that indicates whether this track should be enabled by default when the media is loaded.
use of all attributes in it :-
<video src="video.mp4" controls>
<track src="subtitles.vtt" kind="subtitles" srclang="en" label="English">
</video>