Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

     <p> See more <a>cat photos<a> 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.">
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69

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

Link to the challenge:

When I am following everything to the dot, why does it not accept the code? If two elements are not allowed, then why ask to add opening and closing anchor tags in one element and then set the href in another element?
If I am stumbling at the initial stages even before grasping the idea, what’s the point?

The exercise in Step 12 is:
You can turn any text into a link, such as the text inside of a p element.

<p>I think <a href="https://www.freecodecamp.org/">freeCodeCamp</a> is great.</p>

In the text of your p element, turn the words cat photos into a link by adding opening and closing anchor (a) tags around these words. Then set the href attribute to https://freecatphotoapp.com/

Hello!
This may help you!

Thanks for the response.
I am still unable to code it successfully.
Below is the results found in the Console:
// running tests The link’s

href

value should be

https://freecatphotoapp.com

. You have either omitted the

href

value or have a typo.
// tests completed

Attributes go in the opening tag of your element and affect it without making any changes to the look of your page. The ‘href’ attribute assignes a address for your link. Add it in your opening a tag and give it the value of https://freecatphotoapp.com.

Here is an example of my own.

< h4> The big bear < anchor with url> ate fresh < closing anchor> fish. < h4>

1 Like

Thanks for your replies.
The issue here is two tasks in a single exercise:

  1. In the text of your p element, turn the words cat photos into a link by adding opening and closing anchor (a) tags around these words.
  2. Then set the href attribute to https://freecatphotoapp.com/
    I’ve tried various combinations around and no matter whichever I tried, I get the same error message:
    // running tests
    The link’s href value should be https://freecatphotoapp.com. You have either omitted the href value or have a typo.
    // tests completed
    This is super frustrating and purely wasting everyone’s time.

Learning can be difficult at first. When first introduced to a new tag/attribute try putting it into a search engine to see how it’s used.

Here is some example code:
(this is just an example not the answer)

<p>This is some example code</p>
If I want to make the word ‘example’ into a link
I surround the word with the opening and closing anchor tags
<p>This is some <a>example</a> code</p>
Next I add the href, this is where the link will send the user when clicked
href is an attribute, attributes go inside the opening tag

<p>This is some <a href="text">example</a> code</p>

If your still having trouble, dont be afraid to look for the answer. There are walk throughs on youtube. This is not something I’d advise you do often, however it can help to see the answer if you’ve already made several attempts and asked the community for help.

2 Likes

Thanks for that Guided.
It did sound real promising but unfortunately still the same nagging error message.

Could you copy and past your last attempt?

To display code use three backtics ` before and after a code block.
If you cant find a back tic on your keyboard use ALT+096 to display one

See more cat photos in our gallery

Link to cat pictures

Error message is around the href, not nesting.

The step seems to have an incorrect instruction.

This link does NOT pass
image

This link DOES pass
image

Try removing the / from the end of the link in the href

1 Like

This would not allow me to paste the full code again.

I cannot see your code unless you use a backtic before and after a code line and three before and after a code block

Yep, tried that too, without the end /

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

Your just missing the href in your first anchor

image

Tried that too. Did not allow.
Question is, first

is for nesting and the next

is for href, so why would we use href for nesting, without any link?

could you take a screen shot ?

Well, after attaching the link to nesting with href, it worked and code passed.
Thank you for your time.

1 Like

Glad its working :smiley:

Enjoy :slight_smile: