<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more cat photos in our gallery.</p>
<!-- User Editable Region -->
<img alt a cute src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
<!-- User Editable Region -->
</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/111.0.0.0 Safari/537.36
Challenge: Learn HTML by Building a Cat Photo App - Step 9
Howdy! Thanks for posting your question on the forum.
Your code:
<img alt a cute src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
Instruction:
Inside the img element, add an alt attribute with this text:
A cute orange cat lying on its back
I can see that you’ve added 3 attributes (alt, a, cute) to the img element. This challenge requires you to add an alt attribute to the img element with the value, “A cute orange cat lying on its back”
Syntax of an attribute: <element attribute="value"><elementClosingTag>
You have added 3 different attributes instead of one.
This is what your code should actually look like:
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back">
About the link being red, that doesn’t mark an error. When you post your code on the forum, values and elements will turn red. Just fix the alt attribute, and you should be good to go.
Hope this helped!