Tell us what’s happening:
In the text of your p element, turn the words cat photos into a link to https://freecatphotoapp.com by adding opening and closing anchor (a ) tags around these words
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<!-- User Editable Region -->
<p> Cat Photos<a href="https://freecatphotoapp.com"></a></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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15
Challenge: Learn HTML by Building a Cat Photo App - Step 12
You have changed the given text in this challenge. Your task is to surround only the words “cat photos” in the existing sentence with anchor tags <a href="url">two words</a>.
You’ll need to show us your most recent HTML so we can see what you tried.
To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.
hey there,
am here again for some help, please.
Add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab. am stuck here, now
It would be best to post the new request for help using the help button that appears after 3 unsuccessful attempts at a lesson.
To answer your question. Just add the target attribute as you did the href attribute, and add the value of “_blank” to the target attribute, as you did the link value to the href.
Example: < a href=“url” next attribute=“next value”>text already present