thecodezone.
The Code Zone
Short steps, at your pace · Free lessons and practice · Member video walkthroughs
Save your next small win.

Checking your account…

Responsive Web Design freeCodeCamp companion

Responsive Web Design / HTML / Basic HTML

Debug a Pet Adoption PageA picture loads. A link navigates.

Watch Rob build the project, understand what each part is for, then work through the official freeCodeCamp lab at your own pace.

5 requirements6:06 walkthroughBeginner · Lab · HTML

ORIGINAL WALKTHROUGH · 6:06

Watch with Rob.

Pause whenever you want to try a change. You can return to the lesson at any time.

LEARN WITH THE CODE ZONE

Unlock this video walkthrough

Written lessons and coding practice are free. Video walkthroughs are included with a paid Code Zone membership or an active free trial.

Have a Code Zone website account? Use your learning account’s email to get a six-digit sign-in code, or use your existing website password.

Need a website account? Paid Skool members and active trial members can use the email from their membership questions to request a sign-in code. No invite link or Skool password needed.

Close this window to keep practicing. After signing in, you’ll return to this lesson.

Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.

Rob’s 6:06 recording is paired with the current official lab. The requirement groups below are reading guidance, not video timestamps; your official tests and completion stay on freeCodeCamp.

Finished this walkthrough?

Mark it complete to keep your place in The Code Zone. This does not submit or complete the official freeCodeCamp project.

Next: Build a Cat Photo App

THE IDEA BEHIND THE BUILD

What this lab teaches

Sally’s adoption page already has useful text and destinations. The problems are in the markup that connects them: the image has two incorrect attribute names and an unnecessary closing tag, and both links use the wrong destination attribute. These are five specific repairs grouped under the official lab’s two user stories.

Before changing an attribute, ask what that element is supposed to do. Images load visual content; anchors let someone navigate. Repair each responsibility separately, preserving the supplied URLs, descriptions and labels.

01

Separate loading from navigation

Use src for an image’s location and href for an anchor’s destination.

02

Describe the picture

Recognize alt as the image description instead of an invented attribute.

03

Test every repair

Review the image’s syntax and both links before trusting a partially improved preview.

Cartoon Rob finds a broken pet image and disconnected link, connects source and destination cards to their different jobs, then checks a working adoption page.
Cartoon Rob finds a broken pet image and disconnected link, connects source and destination cards to their different jobs, then checks a working adoption page.

REVIEW THE REQUIREMENTS · THREE CLEAR GOALS

Your route through the lab

These groups are a reading guide to the lab, rather than timestamped chapters of the video.

01Requirements 1–3

Repair the image

Check its source attribute, description and void-element syntax.

Check your understanding: Does the picture load while retaining its supplied alternative text?

Explore requirement 1
02Requirement 4

Repair the first destination

Fix the cat-page anchor attribute without changing its intended URL.

Check your understanding: Does the first label lead to the intended cat page?

Explore requirement 4
03Requirement 5

Repair the second destination and review

Fix the dog-page anchor, then use the official checks to review the image and both destinations.

Check your understanding: Can you trace each remaining failure to a particular element?

Explore requirement 5

SEE HOW THE PARTS FIT

A page with a clear structure

This small example uses a different subject to demonstrate the underlying pattern. It is intentionally incomplete and does not provide the official lab’s finished page.

page-structure.htmlhtml · example
<img src="/images/art-supplies.webp" alt="Brushes ready for a painting workshop">
<a href="/workshops">Find a painting session</a>

Three things to pay attention to

Attribute names are element-specific

An image href and an anchor src do not perform the intended jobs, even if their URL strings look right.

Fix both links

Repairing the first anchor does not automatically fix the second one.

An image does not wrap content

Remove the closing img tag rather than trying to put text between image tags.

UNDERSTAND IT HERE · PRACTICE IT THERE

Explore each requirement

Choose a requirement for a plain-English explanation, a separate code example and resources to explore. When you are ready, its button opens the official freeCodeCamp lab. Your official tests and completion stay on freeCodeCamp.

Requirement 1Give the image a source location

UNDERSTAND THE IDEA

An image needs a source to fetch. The browser reads that location from src; href belongs to other elements such as links and does not tell an img which picture to display.

What you will do

Locate the image in the adoption lab and correct the attribute that holds its existing image URL. Keep the URL itself.

A separate example to explore
step-1-example.htmlhtml · example
<img src="/images/art-supplies.webp">

What to notice: The example points to an art-supplies image. For the lab, preserve Sally’s supplied image location.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Requirement 2Describe the image with alternative text

UNDERSTAND THE IDEA

Alternative text conveys useful image information when someone cannot see the picture. Its attribute name is alt. An invented attribute may remain in the source but will not provide that accessible description.

What you will do

Correct the image’s description attribute while preserving the short descriptive text already supplied in the lab.

A separate example to explore
step-2-example.htmlhtml · example
<img src="/images/art-supplies.webp" alt="Paintbrushes beside a tray of colors">

What to notice: src identifies the file; alt describes the relevant content. They have different jobs.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Requirement 3Recognize the image as a void element

UNDERSTAND THE IDEA

Some HTML elements carry their information in attributes and do not wrap text or child elements. An img is one of these void elements, so a separate closing image tag is not part of its valid HTML structure.

What you will do

Remove the unnecessary closing image tag. Keep the repaired image, its source, and its description.

A separate example to explore
step-3-example.htmlhtml · example
<img src="/images/art-supplies.webp" alt="Brushes ready for a painting workshop">

What to notice: This entire image is one element. There is no </img> after it.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Requirement 4Repair the first link destination

UNDERSTAND THE IDEA

A link does not load its destination as an image. It makes its enclosed text or picture clickable, and href tells the browser where that click should lead. Changing only one link leaves the second failure unresolved.

What you will do

Repair the cat-page link’s destination attribute. Preserve its supplied URL and visible text. Leave the dog-page link for the next repair.

A separate example to explore
step-4-example.htmlhtml · example
<a href="/workshops/painting">Explore painting sessions</a>

What to notice: The destination belongs in href. Text between the a tags is what visitors select.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

Requirement 5Repair the second link and review both

UNDERSTAND THE IDEA

A page can show a valid image while its links are still broken, or navigate correctly while its image lacks a description. Check each responsibility instead of assuming one visual improvement fixed every issue.

What you will do

Repair the dog-page link’s destination attribute while preserving its URL and visible text. Then review all five repairs: image source, alternative text, void-element syntax and both link destinations. Run the official lab checks.

A separate example to explore
step-5-example.htmlhtml · example
<!-- Inspect attributes, then try the behavior. -->
<a href="/workshops">Explore ceramics sessions</a>

What to notice: A test failure should point you back to one element and one responsibility. This directory link is an independent example.

Resources to explore

Read another explanation or experiment with examples before trying the official lab.

Ready to try it? Use freeCodeCamp’s exact requirements and run its checks there. The example above is for understanding the concept.

READY TO BUILD?

Keep the instructions beside the video.

Start the official lab in a new tab, play the walkthrough here, and pause to make each change yourself. Run freeCodeCamp’s checks before moving on. Write and check your project in the official freeCodeCamp editor.

An independent walkthrough by The Code Zone. Not affiliated with or endorsed by freeCodeCamp. The project and official tests belong to freeCodeCamp; the explanations and visual guide on this page are our companion material.