HTML Foundations: Module 4

← Dashboard
Module 4: The Visuals

Media Assets

Add images with <img>, video and audio with <video> and <audio>. Always use alt text for images and width/height to avoid layout shift.

<!-- Image: self-closing, always add alt -->
<img src="coffee.jpg" alt="Fresh cup of coffee" width="400" height="300">

<!-- Video with fallback -->
<video controls width="640">
  <source src="brew.mp4" type="video/mp4">
  Your browser doesn't support video.
</video>

Image Best Practices

img placeholder
img placeholder
Pro Tip

Alt text improves accessibility and SEO. Describe what the image shows.

Sizing

Set width and height to prevent layout shift while the image loads.