The code is the same as in the video but then it says i need something else

It says I need to put a “a” element before part of the code, and I’m watching the video, and my code looks the exact same but it says I need the “a” element, but the video doesn’t

Your code so far


<h2>CatPhotoApp</h2>
<main>



<a href="https://freecatphoto.com">cat photos</a>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Your browser information:

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

Challenge: Link to External Pages with Anchor Elements

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements

@haleyb Welcome to the Free Code Camp forum!

If you compare the value of the href attribute in your code to the value of the href attribute of the url the instructions and video reference, they are different. Look carefully.

2 Likes

i realize the color is different but i don’t understand how to fix it. It is the same code just a different color. How do i fix the color?

Not sure what you mean by color.

You only need to correct the href attribute’s value. You have:

https://freecatphoto.com

but that is not the url the instructions want you to use. See the instructions below:

Create an a element that links to http://freecatphotoapp.com and has “cat photos” as its anchor text.

1 Like

what is an an “a” element exaclty and how does it look when i link it to the code

The a element you currently have is:

<a href="https://freecatphoto.com">cat photos</a>

that is exactly what i have and it says i need a “a” element that links to http://freecatphotoapp.com but i have the exact same thing as the video and you

No you do not. Look at the url between the " and " for the href that you have written vs. the url the instructions and test shows. One of them is 24 characters and the other one is 26 characters.

i’m confused. what do you mean the “and”

i don’t understand what you mean by 26 and 28 characters either.

The url you are using has a different number of characters than the one specified by the instructions. I was just pointing out they have different characters (the length of the urls).

its the same as in the video though

and do i use free code camp or the free cat photos one

I would suggest you just copy and paste the URL given to you in the challenge. It’s easy staring yourself blind looking at strings and trying to compare them.

What do the instructions say to use?

(1/2)

Haley,

An a tag is a link and to save you some time, you didn’t have “app” at the end of the URL in your A element.

Explained below:

Your code shows:

YOUR CODE: < a href=“https://freecatphoto.com”>

vs what they are looking for:

THEIR CODE < a href=“https://freecatphotoapp.com”>

instructions

Hello. The instructions you need to apply are these.

a elements are links. To create one you use <a></a> tags. Between the two 'a' you write your text that will appear in page: for this case, "cat photos". To introduce the destination web address, u will write in the first <a> the url, using a href attribute. -just copy the syntax. In this case, u need to use http, NOT https.

I admire everyone’s patience here. It was cringeworthy, I felt like I was waiting for someone to lose patience, and no one ever did, or at least verbalized they had. Thank you everyone for your civility.

Just want to mention as I am new to coding, I have made many silly mistakes of not looking or reading carefully to the instruction also. In this case, because I was looking at the example given, so I actually typed the freecodecamp URL instead of the freecatphotoapp URL in the first place. So I got the error message, then when I did the correction, I forgot to remove the “s”. Good learning experience.

1 Like

They’re not silly mistakes, actually :slight_smile:

I like to think of them as strategically-important mistakes… we all make them (sometimes more than a couple of times), but each time we learn from them (hopefully). So by the time you’re ready to work as a professional in the industry, you should have got at least 10,000 mistakes out of your system :slight_smile:

And even more importantly, every time you need to track down a bug, no matter how small or silly you’re training your eyes to spot differences between code, identify patterns, and quickly hone in on something that doesn’t look quite right.