Tell us what’s happening:
Step 15
To open links in a new tab, you can use the target attribute on the anchor (a) element.
The target attribute specifies where to open the linked document. target=“_blank” opens the linked document in a new tab or window.
Here is the basic syntax for an a element with a target attribute:
Example Code
freeCodeCamp
Add a target attribute with the value _blank to the anchor (a) element’s opening tag, so that the link opens in a new
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<!-- User Editable Region -->
<p>See more <a href="https://freecatphotoapp.com" target=_blank>cute cats</a> in our gallery!</p>
<!-- 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/18.3.1 Safari/605.1.15
Challenge Information:
Build a Cat Photo App - Step 15