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
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.
TutorialPoint
Using Video tag
The
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
Syntax
Following is the usage of
Example
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.
TutorialPoint
Using Audio tag
The tag
The tag in HTML specifies multimedia files for elements like
Syntax
Following is the usage of tag ?
text?.
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.
TutorialPoint
Usage of Source tag
The
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 ?
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.
TutorialPoint
Usage of Embed tag
Multiple media resources
Now let us discuss multiple media resources in HTML5. There is a possibility of setting numerous media resources for media elements.
Syntax
Following is the usage of multiple media elements in HTML ?
Example
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.