How to add link in code inside paragraph

  • 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.
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a href="cat photos."</a></p>
    
    <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/103.0.0.0 Safari/537.36

Challenge: Step 12

Link to the challenge:

Example for you

<a href = "https://forum.freecodecamp.org/t/how-to-add-link-in-code-inside-paragraph/524562">link to this topic</a>

Aritcle for you <a>: The Anchor element - HTML: HyperText Markup Language | MDN

1 Like

means

text <a href="cat photos"

not working

No. Means

<a href="here should be your link from the task">cat photos</a>

Here is your link from the task:

https://freecatphotoapp.com

Makes sense?

im doing as per above model but not works its asking me to work below first p tag

Can you copy-paste your code here? I need to see how it looks now to give you appropriate hint.

Click here to view more cat photos.

cat photos

Can you add triple backticks in the very beginning and at the very end of your last post. It will look like actual code.
Triple backticks example inside parenthesis:

(```)

(‘A cute orange cat lying on its back.’)

(‘’‘)A cute orange cat lying on its back.(’‘’)

sample code pls with three brackets

```
Your code goes here
```

You can also use the “preformatted text” tool in the editor ( </> ) to add backticks around text.

Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value
can you help me in this how to add anchor tag

Please show us what you have tried so far.

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