Hi guys I’m new to programming and I’m actually in front of this :
" 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" I don’t know what to do when it comes to set the href attribute to the app URL. I’m sure it’s easy but hope you can help memwith that
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 href="cat photos"></a><a href="https://freecatphotoapp.com"></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/118.0.0.0 Safari/537.36
Your nearly there!
The text you want appearing on the page as a link should go between the a tags.
Delete this line.
Now your left with a link containing the address in the href attribute in the opening tag.
Add the text ‘cat photos’ between the opening and closing tag.
Ex:
<p>This is a paragraph with a <a href="">LINK</a> inside</p>
In addition I’m sure you’ll find this article helpful:
Sure!
A link works like this.
it has a opening and closing a tag:
<a></a>
Inside the opening tag goes the attributes things that affect the link but do not appear on the webpage.
Every link should have a href attribute with a value containing the web address that you want the link to lead to:
Ex:
<elementName attribute="value"></elementName>
In between the a opening and closing tags goes the content you want appearing on the page as a link which in this case is the text cat photos.
Ex:
And when clicked on it should send you to ‘link. com’.
Now make sure that you only have one set of a tags with an href attribute containing the address https://freecatphotoapp.com and the text ‘cat photos’ between them as a link.
If its still not clear to you I’m sure you’ll find @Gray.n.Grey article helpfull.
Sorry But that’s not allowed.
Why don’t you post your updated code so we can see what’s happening. Paste it between the ```` marks that appear when clicking the </> button: