CHOOSE ANY STEP
FREECODECAMP / HTML / STEP 4 OF 42
freeCodeCamp: Build a Cat Photo App, Step 4
Leave an HTML comment
Written guidance is free. Step videos are a member benefit.
Start with the opening comment marker: less than, exclamation mark, two hyphens. Add the exact text, TODO colon Add link to cat photos. Then close the comment with two hyphens and greater than. Take a moment to check both markers. Now let's compare the code and the page.
ORIGINAL WALKTHROUGH · 1:05
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 “Leave an HTML comment” while keeping the earlier page structure.
- Explain HTML comment and the role it plays in this change.
- Compare the expected preview with your work before running the official checks.
THE TASK
What step 4 asks you to do
- Your comment should start with
<!--. You are missing one or more of the characters that define the start of a comment. - Your comment should end with
-->. You are missing one or more of the characters that define the end of a comment. - Your code should not have extra opening/closing comment characters. You have an extra
<!--or-->displaying in the browser. - Your comment should be above the
pelement. You have them in the wrong order. - Your comment should contain the text
TODO: Add link to cat photos.
Based on the official freeCodeCamp step 4 instructions (opens in a new tab).
Why this works
In step four, you will leave a note in the HTML without adding text to the page. Find the paragraph that says Everyone loves cute cats online. The comment belongs directly above that paragraph. Let's add the note there.
What you should see in the preview
The note is visible in your source, but it does not appear in the page preview. That is what an HTML comment does. This note is a reminder to add a link later; it does not create a link yet. Keep the paragraph below it 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
- HTML comment
- A note in the source between <!-- and -->. The browser does not display its text in the page preview.
If your check does not pass
- Your comment should start with
<!--. You are missing one or more of the characters that define the start of a comment. - Your comment should end with
-->. You are missing one or more of the characters that define the end of a comment. - Your code should not have extra opening/closing comment characters. You have an extra
<!--or-->displaying in the browser. - Your comment should be above the
pelement. 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:
- MDN: HTML element reference (opens in a new tab)
Look up the definition, syntax and supported behavior.
What you have accomplished
The change for “Leave an HTML comment” 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).