html video and audio tag এইসটিএমএল অডিও ভিডিও ট্যাগ
Throughout our experiences on numerous websites, we've encountered instances where various audio and video files are seamlessly integrated. Today, we will explore the process of utilizing HTML tags to facilitate the playback of audio and video content.
For video playback, the <video> tag is employed, while the <audio> tag is used for audio playback.
Example of the video tag:
<!DOCTYPE html><html lang="en"><head><title>agileposts.blogspot.com</title></head><body><video src="video.mp4" width="300px" height="300px" preload loop controls autoplay></video></body></html>
Explanation of the code:
<video src="video.mp4" width="300px" height="300px" preload loop controls autoplay></video>src="video.mp4": Specifies the location of the video file.width="300px": Sets the width dimension of the video.height="300px": Sets the height dimension of the video.preload loop controls autoplay: These attributes define the video's behavior (preload, looping, controls, and autoplay).
Example of the audio tag:
<!DOCTYPE html><html lang="en"><head><title>agileposts.blogspot.com</title></head><body><audio src="audio.mp3" width="300px" height="40px" preload loop controls autoplay></audio></body></html>
Explanation of the code:
<audio src="audio.mp3" width="300px" height="40px" preload loop controls autoplay></audio>src="audio.mp3": Specifies the location of the audio file.width="300px": Sets the width dimension of the audio player.height="40px": Sets the height dimension of the audio player.preload loop controls autoplay: These attributes determine the audio's behavior (preload, looping, controls, and autoplay).
In HTML, an array of tags can be harnessed to create dynamic content. This brief exploration demonstrates the fundamental use of <video> and <audio> tags for embedding multimedia files within web pages. The code snippets exemplify how to configure the size, location, and playback attributes for both video and audio content.