Help for a noobie required! :D

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

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p><a href="https://Click here to view more cat photos.</p>
    <a href="https://freecatphotoapp.com"></a>
    <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/102.0.0.0 Safari/537.36

Challenge: Step 12

Link to the challenge:

Can someone help me with this i dont really get it tbh:

Turn the words cat photos located inside p element into a link using the same value for the href attribute as the link below the p element. The p element should show the same text in the browser, but the words cat photos should now be a link. Make sure to remove the a element with the text cat photos on the line below the p element.

alright first its newbie not noobie :smiley:

Anyway let me try make this as simple as i can.

like every other element the anchor starts with open tag : <a> and ends with closing tag </a>

but anchor need href attribute to define where it should go. inside the href the value is the website URL your destination so anchor open tag is <a href="">

now i have this sentence :
Click here to learn more

you want to make this whole link a link that if clicked goes to Wikipedia so you do this:
<a href="https://wikipedia.com"> Click here to learn more </a>
and itll look like this: Click here to learn more

Now lets say you want only the word Click to be the link:
<a href="https://wikipedia.com"> Click </a> here to learn more
and itll look like this : Click here to learn more

hope this helps

What if i wanna add it within the P attribute? how is that done?

click here to learn more works?

use this when u write code so i can see what you wrote

I have to nest my A element within my P element:S

this is the script so far

Click here to view more cat photos.


cat photos

alright lets start fresh.
Click on Restart Step … then remember what i told you about href its where you type the destination its an attribute for <a>

just like what i said about my example :
<p> Hello World </p>
appears like this:

Hello World

make World a link by nesting it inside an <a> element
<p> Hello <a href=""> World </a> </p>
appears like this :

Hello World

u want the link to go to youtube so u do this
<p> Hello <a href="https://youtube.com"> World </a> </p>

at the cost of sounding completely ignorant, I will share with you my issue:

Turn the words cat photos located inside p element into a link using the same value for the href attribute as the link below the p element. The p element should show the same text in the browser, but the words cat photos should now be a link. Make sure to remove the a element with the text cat photos on the line below the p element.

Click here to view more cat photos.

cat photos

This is sadly still not working for me. Sadly. Reckon you have a link to some youtube video discussing this specific part? cant find any

My apologies for the very late reply

alright i still cant see your code cause your not using the (preformatted text)
you can do that by simple target the code you want and click Ctrl+E .
like this … <p> Hi </p>
without using that all i see is the text Hi i cant see the <p></p>
so i have no idea what ur code is.

but i think i figured out your mistake. restart step and you will see this code:

<p>Click here to view more cat photos.</p>
      <a href="https://freecatphotoapp.com">cat photos</a>

now the task is asking you to do 2 things .
1- turn the word (cat photos) the one inside your <p> into a link .
<p>Click here to view more cat photos.</p>

.

2 - delete the second cat photos that u turned into a link before
<a href="https://freecatphotoapp.com">cat photos</a>

i beleive i already explained to you how to turn a specific word or sentence inside a <p> into a link.

you want a very HELPFUL advice .
this video explains the important parts about HTML for beginners. watch it fully and work with it while watching it.

then move to CSS crash course which explains the most important parts of CSS (obviously css still has tons of stuff cant be packed into a 1 hour video but this one enough to get you started right)

then when you done with this 2 videos come back to this website and youl be able to work with it A LOT better and faster.

one more advice … dont get stuck watching crash courses and tutorials. cause you wont learn much and youl get frustrated … so only use such videos when you absolutely need them

Thank you so much for the videos i will go through them.

Really appreciate your help on this buddy im trying to make a career shift into IT and coding

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