HTML5 supports five media elements, that are useful for creating media resources. The different media tags are
These tags are used to change the development, let us discuss each element in detail with an example ?
The
To play videos on your web page, you can use the HTML
<video controls="controls">
<source src="sample.mp4" type="video/mp4">
<source src="sample.ogv" type="video/ogg">
Your browser does not support the HTML5 Video element.
</video>
Example
The following example demonstrates the usage of the in HTML. This code creates a webpage with a blue heading "TutorialPoint," a paragraph "Using video tag," and an embedded video player that loads and plays a video from a specified URL.
The in HTML is used to specify audio content on a webpage. It allows us to play audio content on a webpage. It allows us to play audio files OGG, MP3, or WAV directly in the browser. This tag supports attributes such as pause, play, and volume. The
This HTML code creates a webpage with a blue heading "TutorialPoint," a paragraph"Using Audio tag," and an embedded audio player that automatically plays an MP3 file with controls.
The tag in HTML specifies multimedia files for elements like
Syntax
Following is the usage of tag ?
<source src=" " type= " ">
text?.
</source>
Example
The following example demonstrates the usage of the tag. This HTML code creates a webpage with a blue heading "TutorialPoint," a red paragraph "Usage of Source Tag," and an embedded audio player that automatically plays an MP3 file with controls.
The in HTML is used to embed external content or media files(such as video, audio, or interactive elements) into a webpage, including plug-ins like Flash animation.
Syntax
Following is the usage of embed tags in HTML ?
<embed attribute>
Example
This HTML code creates a webpage with a blue heading "TutorialPoint," a red paragraph "Usage of Embed tag," and an embedded GIF from Giphy displayed in an iframe with controls.
This HTML code creates a webpage with a blue heading "TutorialPoint," a red paragraph, and sections for audio and video players, embedding an MP3 file and an MP4 video with controls.