CODE PATH
PRO ACCOUNT

Master Code
On The Go

Learn. Practice. Build.

Quest 1 β€’ Lesson 3

πŸ–ΌοΈ Images & Multimedia

Images, videos, and audio make web pages engaging. The < img > tag is the simplest way to add an image.

"A picture is worth a thousand words – but the alt attribute tells screen readers what the picture shows."
image.html
<img src="photo.jpg" alt="A description of the photo" />

🧠 Understanding the Image Tag

🌐 Image Sources: Local vs External

Local file – image stored in your project folder.
<img src="images/logo.png" alt="Logo">
External URL – image from another website.
<img src="https://placehold.co/300" alt="Placeholder">

πŸŽ₯ Video & Audio (Bonus)

Video
<video controls width="400">
  <source src="movie.mp4" type="video/mp4">
</video>
Audio
<audio controls>
  <source src="song.mp3" type="audio/mpeg">
</audio>

✨ Challenge: Add an Image to Your Page

Use an online placeholder image (e.g., https://placehold.co/300;) and add an appropriate alt attribute. Then try adding a local image (create a simple "myphoto.jpg" in the same folder).

<img src="https://placehold.co/300" alt="Placeholder image" width="300">

<img src="myphoto.jpg" alt="My own photo" width="300">

πŸ” Live Preview (Try It!)

Below is a real placeholder image rendered from the code above:

Placeholder image

❀️ Support Free Education

This course is 100% free. If it helps you, consider buying me a coffee.

β˜• Buy Me a Coffee

➑️ Ready for more?

Next lesson: Lists & Tables – organise data effectively.

Continue to Lesson 1.4 β†’

(Coming soon – check back or buy Pro Pack for instant access)