Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.16 KB

File metadata and controls

47 lines (33 loc) · 1.16 KB

Multimedia Elements in HTML

HTML provides various elements to embed multimedia content such as images, audio, and video into web pages. Here are some of the key elements:

Images

To embed images, use the <img> tag:

<img src="path/to/image.jpg" alt="Description of image">

Audio

To embed audio files, use the <audio> tag:

<audio controls>
    <source src="path/to/audio.mp3" type="audio/mpeg">
    Your browser does not support the audio element.
</audio>

Video

To embed video files, use the <video> tag:

<video width="320" height="240" controls>
    <source src="path/to/video.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>

Embedding YouTube Videos

To embed YouTube videos, use the <iframe> tag:

<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0" allowfullscreen></iframe>

Conclusion

Using these HTML elements, you can easily add multimedia content to your web pages to enhance user experience.