Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Introduction to HTML Level One ยท Lesson 6 of 11

Module Five

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
6
Module 5 - Images and Multimedia

Module 5: Images and Multimedia

Module Introduction

So far, we have learned how to add text, headings, lists, and links to a webpage.

In this module, we will learn how to add pictures, music, and videos to make our webpages more fun and exciting.


Lesson 1: What is an Image?

An image is a picture displayed on a webpage. Pictures help visitors understand information more easily.

For example, instead of describing a dog, you can simply show a picture of a dog.

Fun Example

Think of a webpage as a storybook. Images are the colorful illustrations that make the story interesting.


Lesson 2: Adding Images to a Webpage

HTML uses the <img> tag to display images.

<img src="dog.jpg" alt="A cute dog">

What Do These Mean?

  • img = image tag
  • src = where the image is stored
  • alt = description of the image

Lesson 3: Understanding Image Paths

The browser needs to know where the picture is saved. The location of the image is called the image path.

<img src="football.jpg" alt="Football">

This means the image named football.jpg is saved in the same folder as the HTML file.

Fun Example

Imagine sending a friend to your classroom. You must tell them exactly where it is. The image path tells the browser where to find the picture.


Lesson 4: Changing Image Size

We can make images bigger or smaller using width and height.

<img src="dog.jpg"
     alt="Dog"
     width="200"
     height="150">

Width controls how wide the image is. Height controls how tall the image is.


Lesson 5: Why the ALT Attribute is Important

The alt attribute describes the image.

<img src="cat.jpg"
     alt="A white cat sleeping">

If the image cannot be displayed, the browser shows the description.

It also helps people who use screen readers understand the picture.


Lesson 6: Adding Audio

Audio allows visitors to listen to sounds or music.

<audio controls>
    <source src="song.mp3">
</audio>

The controls attribute creates play and pause buttons.

Fun Example

Imagine adding your favorite song to your webpage. Visitors can listen to it while reading.


Lesson 7: Adding Videos

Videos can also be displayed on a webpage.

<video width="300" controls>
    <source src="video.mp4">
</video>

Visitors can play, pause, and watch the video.

Fun Example

Imagine creating a webpage about football and adding a video showing your favorite football match.


Lesson 8: Complete Example

<!DOCTYPE html>
<html>

<head>
    <title>My Favorite Animal</title>
</head>

<body>

<h1>My Favorite Animal</h1>

<p>I love dogs.</p>

<img src="dog.jpg"
     alt="A happy dog"
     width="250">

</body>

</html>

Class Exercise 1

Fill in the blanks:

  1. _____ is used to display images.
  2. _____ tells the browser where the image is saved.
  3. _____ describes an image.
  4. _____ controls image width.
  5. _____ is used to display audio.

Class Exercise 2

Create a webpage called mypet.html.

Include:

  • A heading called "My Pet"
  • A paragraph about your pet
  • A picture of your pet
  • An alt description for the image

Class Exercise 3

Fix the missing parts below:

<img _____="cat.jpg"
     _____="A cute cat"
     width="200">

What attributes are missing?


Mini Project

Create a webpage called myfavoriteanimal.html.

Add:

  • A heading
  • A paragraph about the animal
  • An image of the animal
  • A short audio file (optional)
  • A short video file (optional)

Challenge Exercise

Create a webpage about your favorite football team, cartoon character, or superhero.

Include:

  • One heading
  • Two paragraphs
  • One image
  • One hyperlink
  • A horizontal line

Module Summary

  • Images make webpages colorful and interesting.
  • The <img> tag displays images.
  • The src attribute tells the browser where to find an image.
  • The alt attribute describes an image.
  • Width and height control image size.
  • The <audio> tag adds sound.
  • The <video> tag adds videos.
  • Multimedia makes webpages more fun and interactive.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’