Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Adding Pages to a Website Make an About Page

how do you set the img source to "img/gratt.png"?

I did this code:

<img source = "img/gratt.png">

The code challenge is telling me to "Be sure to set your image to display "img/gratt.png".

What did I do wrong?

3 Answers

Jesus Mendoza
Jesus Mendoza
23,289 Points

Hey Micah, in this particular challenge you have to add an img tag inside the section tag, add the src with the url "img/gratt.png", add a description using alt and then add a class named "profile-photo"

Here is the code

<img src="img/gratt.png" alt="Gratt's profile picture" class="profile-photo" />
Nicholas Grenwalt
Nicholas Grenwalt
46,626 Points

You would first locate the section item in the HTML and then between its opening and closing tags insert the image tag that follows below. Hope this helps.

<section>
<img src="img/gratt.png" alt="Write Description Here" class="profile-photo">
</section>

This is the correct answer for the step u had trouble with. <blockquote>

<section>
        <img src="img/gratt.png" alt="My profile picture" class="profile-photo">
 </section>

</blockquote> If i managed to help, mark my answer as the best