September 15, 2024

Images and multimedia elements are essential components of web pages. They help to engage users and convey information in a more interesting and interactive way.

We’ll see how to add images, audio, and video to your web pages using HTML

Adding Images

To add an image to your web page, you need to use the <img> tag.

The <img> tag is a self-closing tag that does not require a closing tag

<img src="https://www.futurefundamentals.com/wp-content/uploads/2022/02/75.png " alt="Example Image">
Example Image

“src” attribute specifies the path to the image file.

The “alt” attribute provides alternative text that will be displayed if the image cannot be loaded.

You can also set the width and height of the image using the “width” and “height” attributes

<img src="https://www.futurefundamentals.com/wp-content/uploads/2022/02/75.png " alt="Example Image” width="500" height="300">

Adding Audio

To add audio to your web page, you can use the <audio> tag.

The <audio> tag is a container tag that allows you to specify the audio source file and other properties.

<audio src=" https://freesound.org/people/Tattoo_Beatz/sounds/615347/" controls>
</audio>

The “src” attribute specifies the path to the audio file, and the “controls” attribute adds audio controls to the player, such as play, pause, and volume controls.

Adding Video

To add video to your web page, you can use the <video> tag.

The <video> tag is a container tag that allows you to specify the video source file and other properties

<video src="video.mp4" controls></video>

In the example above, the “src” attribute specifies the path to the video file,

The “controls” attribute adds video controls to the player, such as play, pause, and volume controls.

Conclusion

We have discussed how to add images, audio, and video to your web pages using HTML to create more engaging and interactive web pages that can help to convey information in a more interesting and effective way.

Leave a Reply

Your email address will not be published. Required fields are marked *