CHOOSE ANY STEP
FREECODECAMP / HTML / STEP 7 OF 42
freeCodeCamp: Build a Cat Photo App, Step 7
Add an image element
Written guidance is free. Step videos are a member benefit.
Add the image element listed in the task below. It uses one tag, with an opening angle bracket and a closing angle bracket. Unlike a paragraph, an image is a void element. It does not need a separate closing tag. Keep just one image element below the paragraph.
ORIGINAL WALKTHROUGH ·
Watch with Rob.
Watch the explanation, then apply the change and run the official checks on freeCodeCamp.
You are signed in, but video access needs attention. Check your account access. Your saved work is kept.
Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.
Your goals for this step
- Apply the requirements for “Add an image element” while keeping the earlier page structure.
- Explain img and the role it plays in this change.
- Compare the expected preview with your work before running the official checks.
THE TASK
What step 7 asks you to do
- Your
imgelement should have an opening tag. - Your
imgelement should not have a closing tag</img>. - You should only have one
imgelement. Remove any extras. - Your
imgelement should be below thepelement. You have them in the wrong order.
Based on the official freeCodeCamp step 7 instructions (opens in a new tab).
Why this works
An image starts with an image element. In step seven, we're adding its HTML before choosing the picture. Find the paragraph inside main. The new image element belongs on the line just below it.
What you should see in the preview
Notice that no picture appears yet. That's expected. We haven't given the browser an image address. For this step, check the element's position and leave your existing headings, comment, and paragraph unchanged.
Illustrative browser result. External embeds, navigation and form submission are disabled here. Open freeCodeCamp to test the real behavior. Drag the lower-right corner to make this preview taller.
Terms to know
- img: Image element
- Displays an image from its src. It is a void element, so it does not have a closing tag.
If your check does not pass
- Your
imgelement should have an opening tag. - Your
imgelement should not have a closing tag</img>. - You should only have one
imgelement. Remove any extras. - Your
imgelement should be below thepelement. You have them in the wrong order.
Use the preview to inspect the structure, then run the checks on freeCodeCamp. Watching here does not submit code or mark an official step complete.
Know where to find it
You do not have to memorize every element or CSS property. Keep useful references nearby:
- W3Schools: images (opens in a new tab)
Compare the syntax and a focused example.
- MDN: HTML element reference (opens in a new tab)
Look up the definition, syntax and supported behavior.
What you have accomplished
The change for “Add an image element” is ready to try. Return to freeCodeCamp, compare your result with the requirements, and run its checks. Your official progress stays there.
Independent guidance from The Code Zone, not affiliated with or endorsed by freeCodeCamp. Complete official work and certification requirements on freeCodeCamp. Curriculum checked November 15, 2026. Curriculum source (opens in a new tab).