Learn HTML by Building a Cat Photo App - Step 12

I have omitted an href error or my href value is invalid
I have copy and pasted my link but it still says my href value is invalid

Your code so far

      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

<p href="https://freecatphotoapp.com"><a>cat photos<a/><p/>   <p>See more cat photos in our gallery.</p>
      <a href="https://freecatphotoapp.com">link to cat pictures</a>

<!-- User Editable Region -->

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 12

Link to the challenge:

You have your code a bit back-to-front. Your href attribute belongs inside the anchor element, not a p element. Also, you’ve created an unnecessary additional p element and duplicated the text ‘cat photos’.
If you want to turn a portion of text into a link, you simply enclose the existing portion of text inside an anchor element, and give the opening anchor tag the appropriate href attribute.


<!-- text without link -->
<p>Please visit my website for awesome content</p>

<!-- 'my website' turned into a link -->
<p>Please visit <a href="example.com">my website</a> for awesome content</p>
1 Like

Thank you so much I’ll try it out!!

You don’t put the href attribute inside the “p” element your coding is wrong, read the instructions carefully before you code

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.