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 trialDavid Norton
2,762 PointsWhat am I doing wrong?
This is my code for placing an image in the section area and it comes back saying Bummer place and image in the sections area. What am I doing wrong?
<section> < img src="img/grat.png" alt="Picture of a Gratuity" class="profile-photo"> </section>
6 Answers
notf0und
11,940 PointsPossibly just a typo here, but the image should be spelled "gratt.png", you have it missing a 't'. Otherwise your code should work, so long as it's in the <section></section>
element.
cbcbcb
16,560 PointsYou have a space between the html element's name and the opening angle bracket. That is your problem.
notf0und
11,940 PointsI think that's just so he could post it to the forums. Without spaces the line of code would disappear I believe.
David Norton, you can add code to the forums with Markdown (you may see the link to the "Markdown Cheatsheet near the bottom of your post). Add your code in like this for it to be visible:
```html
<img src="img/gratt.png" alt="Picture of a Gratuity" class="profile-photo">
```backticks here to close
That will appear in the forums like so:
<img src="img/gratt.png" alt="Picture of a Gratuity" class="profile-photo">
cbcbcb
16,560 PointsYou can add code regardless. All the markdown does is apply formatting to the section that is wrapped within the ticks.
cbcbcb
16,560 Points<img src="img/grat.png" alt="Picture of a Gratuity" class="profile-photo">
cbcbcb
16,560 PointsNo you're right it didn't render.
David Norton
2,762 PointsSomething so simple as misspelling a word. What a foolish mistake
Thank You Dave
notf0und
11,940 PointsHappens a surprising amount :)
Good luck and have fun with the rest of the course.
David Norton
2,762 PointsMisspelled gratt
David Norton
2,762 PointsThank You Appreciate the info
Ryan Harper
3,441 Pointshave you tried using a .jpg file?
notf0und
11,940 PointsThis won't work, Ryan. The Code Challenge asks specifically for "gratt.png" to be displayed.