curriculum/challenges/english/blocks/workshop-cat-photo-app/5dfa3589eacea3f48c6300ae.md
Within the second section element, add a new h2 element with the text Cat Lists.
Your section element should have an opening tag. Opening tags have this syntax: <elementName>.
assert.lengthOf(document.querySelectorAll('section'), 2);
assert.lengthOf(code.match(/<\/section>/g), 2);
Your h2 element should have an opening tag. Opening tags have this syntax: <elementName>.
assert.lengthOf(document.querySelectorAll('h2'), 2);
Your h2 element should have a closing tag. Closing tags have a / just after the < character.
assert.lengthOf(code.match(/<\/h2\>/g), 2);
Your second h2 element should be right above the second section element's closing tag. It is not in the correct position.
const secondSection = document.querySelectorAll('section')[1];
assert.equal(secondSection?.lastElementChild?.nodeName, 'H2');
The second h2 element should have the text Cat Lists. You have either omitted the text or have a typo.
assert.equal(
document
.querySelectorAll('main > section')[1]
?.lastElementChild?.innerText?.trim().replace(/\s+/g, ' ').toLowerCase(), 'cat lists'
);
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"></a>
</section>
<section>
--fcc-editable-region--
--fcc-editable-region--
</section>
</main>
</body>
</html>