Use Media Tags in HTML
You can use various types of media tags in HTML to embed different types of media content, such as images, audio, video, and more. Here are some commonly used media tags in HTML. For more understanding, you can explore the below-mentioned example with the syntax:
<img>
It is used to display images on a web page.
<img src="path/to/image.jpg" alt="Image description">
<audio>
It is used to embed audio content and provide audio controls.
<audio src="path/to/audio.mp3" controls></audio>
<video>
It is used to embed video content and provide video controls.
<video src="path/to/video.mp4" controls></video>
<source>
It is used within <audio> or <video> tags to specify alternative audio or video sources for different formats or quality levels.
<video controls>
<source src="path/to/video.webm" type="video/webm">
<source src="path/to/video.mp4" type="video/mp4">
Your browser doesn't support HTML5 video.
</video>
<iframe>
It is used to embed external content or web pages within an HTML document.
<iframe src="https://www.example.com"></iframe>
<picture>
It is used to define multiple sources for an image and provide different versions based on device capabilities or screen sizes.
<picture>
<source srcset="path/to/image.webp" type="image/webp">
<img src="path/to/image.jpg" alt="Image description">
</picture>