CHOOSE ANY STEP
FREECODECAMP / HTML / STEP 2 OF 42
freeCodeCamp: Build a Cat Photo App, Step 2
Introduce the photo section
Written guidance is free. Step videos are a member benefit.
Type the opening H two tag, Cat Photos with a space, and the closing H two tag. Both headings stay inside the body. The new element follows the complete H one element, rather than sitting inside it.
ORIGINAL WALKTHROUGH · 0:53
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 “Introduce the photo section” while keeping the earlier page structure.
- Explain h2 and the role it plays in this change.
- Explain body and the role it plays in this change.
- Compare the expected preview with your work before running the official checks.
THE TASK
What step 2 asks you to do
- Your
h1element should have an opening tag. - Your
h1element should have a closing tag. - You should only have one
h1element. Remove the extra. - Your
h1element's text should beCatPhotoApp. - Your
h2tags should be in lowercase. By convention, all HTML tags are written in lowercase. - Your
h2element should have an opening tag. - Your
h2element should have a closing tag. Closing tags have a/just after the<character. - Your
h2element's text should beCat Photos. Only place the textCat Photosbetween the opening and closingh2tags. - Your
h2element should be below theh1element. Theh1element has greater importance and must be above theh2element.
Based on the official freeCodeCamp step 2 instructions (opens in a new tab).
Why this works
Step two adds a heading for the photo section. Keep the existing H one. On a new line below it, add an H two element with the exact text Cat Photos.
What you should see in the preview
The H one names the whole page. The H two introduces one section. Its level describes that relationship, not just a smaller font size. In the preview, you can now see both headings. Check their order and exact text, then run the checks on freeCodeCamp.
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
- h2: Level-two heading
- Introduces a section below the main heading in the document hierarchy.
- body: Document body
- Contains the page content shown to visitors. Keep visible headings, paragraphs, lists and media inside it.
If your check does not pass
- Your
h1element should have an opening tag. - Your
h1element should have a closing tag. - You should only have one
h1element. Remove the extra. - Your
h1element's text should beCatPhotoApp.
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: headings (opens in a new tab)
Compare the syntax and a focused example.
- W3Schools: elements (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 “Introduce the photo section” 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).