Adding Images to Your Website and giving it an alternate attribute

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

Tell us what’s happening:

Your code so far


<img src="https://bit.ly/fcc-relaxing-cat" alt"Relaxing Cat are nice for a good photo shoot."/>
<h2>CatPhotoApp</h2>
<main>
   <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-images-to-your-website/

Welcome to the community! You need to put an equals sign “=” after the word alt, just like you did after src.

EDIT: I was on mobile when I answered, and I kind of just gave you the answer, so I want to add something - All attributes in HTML need to have an equals sign after them. you are telling the computer you want an image: <img with the attributes src and alt. You have to say src="example.com" and alt="Example text".

1 Like