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/
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.
Thanks for your replies.
The issue here is two tasks in a single exercise:
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’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.