Images and Multimedia in HTML
Images
Use the <img src="image.jpg" alt="Description"> tag to embed images into a webpage. The src attribute specifies the file path, while alt provides alternative text for accessibility and SEO.
Example
<img src="dog.jpg" alt="A cute dog">
Multimedia
You can embed audio and video using the <audio> and <video> elements. These tags allow browsers to play media directly without external plugins.
Example
<video controls width="300" height="150"> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video>
Accessibility Tip
Always include descriptive alt text for images and captions for videos. This improves usability for screen readers and enhances search engine understanding.