HTML · Lesson 3 of 4

Add an image and describe it

Use img to add an image. Put its filename in src and a description in alt. The description helps people who cannot see the image, and appears if it fails to load.

Your task

Choose an image from your computer, then write a description of what it shows. Run the code to see it.

Each new lesson builds on your personal page. Your saved lesson draft opens when you return.

The image stays in your browser. Choose it before running; its filename replaces the example filename.

Your page

Checks use your current code. Try the page yourself too.

Open your page on your computer
  1. Save the page using the link below. Put it in a new folder.
  2. Copy your chosen image into the same folder. Its name must match the filename in src.
  3. Double-click index.html to open it in your browser. Check the image and links.
  4. To edit it locally, open the file in a plain text editor or VS Code. Save your changes, then refresh the browser.

Can you see the image, and have you described it? Save the page and open it on your computer before starting your project.

Next: Project: your personal page