curriculum/challenges/english/blocks/workshop-cat-photo-app/5ef9b03c81a63668521804e9.md
Turn the existing freeCodeCamp.org text into a link by enclosing it in an anchor (a) element. The href attribute should be set to https://www.freecodecamp.org.
Your anchor (a) element should be nested within the p element inside the footer. Make sure to add an opening tag and closing tag for the anchor (a) element.
assert.isNotEmpty(document.querySelectorAll('footer > p > a'));
Your anchor (a) element should have a closing tag. Closing tags have a / just after the < character.
const aElemClosingTags = code.match(/<\/a\>/g);
assert.exists(aElemClosingTags);
assert.lengthOf(aElemClosingTags, 4);
Your anchor (a) element should have an href attribute with the value https://www.freecodecamp.org. You may have omitted the attribute/value, or have a typo.
const nestedAnchor = document.querySelectorAll('footer > p > a')[0];
assert.equal(nestedAnchor?.getAttribute('href').toLowerCase(), 'https://www.freecodecamp.org');
The link's text should be freeCodeCamp.org. You have either omitted the text or have a typo.
const nestedAnchor = document.querySelectorAll('footer > p > a')[0];
assert.equal(
nestedAnchor?.innerText?.trim().toLowerCase(),
'freecodecamp.org'
);
After nesting the anchor (a) element, the only p element content visible in the browser should be No Copyright - freeCodeCamp.org. Double check the text, spacing, or punctuation of both the p and nested anchor element.
const pText = document.querySelectorAll('footer > p')[0]?.innerText?.trim().toLowerCase().replace(/\s+/g, ' ');
assert.match(pText, /^no copyright - freecodecamp\.org$/);
<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>
<h2>Cat Lists</h2>
<h3>Things cats love:</h3>
<ul>
<li>catnip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<figure>
<figcaption>Cats <em>love</em> lasagna.</figcaption>
</figure>
<h3>Top 3 things cats hate:</h3>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<figure>
<figcaption>Cats <strong>hate</strong> other cats.</figcaption>
</figure>
</section>
</main>
<footer>
--fcc-editable-region--
<p>No Copyright - freeCodeCamp.org</p>
--fcc-editable-region--
</footer>
</body>
</html>