What is the first “>” for in this example? The <a has a closing at the end of the line already. The img src has its own < and >.
I didn’t originally have the first “>” after href="#" but I needed to add it to show the picture of the cat and it is the correct answer.
Just wondering why that symbol is need there.
<a href="#"> <img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
All HTML tags are contained within angle brackets (<>). The
<a href="#"> tag is a separate tag from the
<img src="...etc"> tag. If the first tag didn’t have the closing angle brace, then the
img tag would be seen as part of the
a tag rather than a child component.
Does that help clear it up?
Yes. The a tag opens
href inside with
> at end. Then closing tag
</a> at end. This rather than opening
<a> like with
<p> for example.