Learn HTML by Building a Cat Photo App - Step 15

Hi everyone, I was hoping someone could help me with this code I’m stuck on. I am trying to add a link to the image so the image will open up in a new window, however not too sure where to put the closing tag. The error states " Your anchor (a ) element should have a closing tag. Closing tags have a / just after the < character." I have tried to place the closing tag after the link, however it is not working. Not too sure where the closing tag can go.

<a target=“_blank” href= “https://freecatphotoapp.com” A cute orange cat lying on its back."

Hello and welcome to the community :smiley:!
To post your code as well as a link to the step press on the ‘help’ button that appears next to the ‘submit’ button after unsuccessfully submitting your code a few times.:

Here is an example of an closing a tag.

<a href="" alt=""> This is a link </a>

alt is an attribute that goes in the a opening tag and before your a closing tag.

Welcome to the community :smiley:

When your first learning, its often helpful to use a search engine when first introduced to something new.

Seeing code syntax, even if you dont understand it, will give you a familiarity with the language.

example code:
(these examples all have an opening and closing tag)

<p>This is an example of a paragraph</p>
<h1>This is an example of a heading</h1> 
<a href="example" target="_blank">This is an example link</a>

example code:
(these examples are all self closing)

<img src="example"/>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="styles.css"/>
1 Like

Hello and welcome to FCC Forum, a community of people helping each other!

Here is a great article, with good examples, on how to turn images and text into links. It is authored by one of the leaders.

Happy coding! :slight_smile:

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