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 trialJohnathan Rowley
3,842 Pointsstill do not get it
i have already asked the a question about the code challenge 2 of 2 about adding images to the sit i type in <img src"img/numbers-01.jpg " alt> did not work then i typed in < a href="img/numbers-01.jpg alt""> thats wrong can somebody help me here! no matter what i type the images do not show on the unordered list plus i know it not my computer because every other challenge i have passed again can get any tips here!
12 Answers
Adam Bass
Courses Plus Student 11,613 PointsI'm not sure where the code is not working either. Without seeing all the code for the challenge its hard to tell. I just took a look at the challenge and got the following code to pass. Take a look at it and see if it helps find where there might be something missing in your code.
<section>
<ul>
<li><img src='img/numbers-01.jpg' alt=''></li>
<li><img src='img/numbers-02.jpg' alt=''></li>
<li><img src='img/numbers-06.jpg' alt=''></li>
</ul>
</section>
Tom Bedford
15,645 PointsHi Johnathan, it looks like your combining the anchor <a>
tag and the image <img>
tags there!
An anchor tag looks like this:
<a href="/path/to/file.html">amazing link</a>
An image tag looks like this:
<img src="/path/to/image.jpg" alt="a pretty red flower">
Hope this helps!
Adrian Melendez
5,555 PointsSee My Answer Below
Adrian Melendez
5,555 PointsTo show images, you need to use an img element.
It'll look something like:
<img src="img/numbers-01.jpg" alt="Something">
To make it a link you will need to enclose the img tag in an anchor (a) tag.
It'll look something like:
<a href="http://example.com"><img src="img/numbers-01.jpg" alt="Something"></a>
Matthew Shettler
8,819 PointsIf you're trying to add an image to the page, it needs to go into an image tag (not an anchor tag).
<img src="http://i.imgur.com/h0mYegd.gif" alt="Pokeball Cat">
Voila, your image appears.
Johnathan Rowley
3,842 Pointsbut were do you get the images for the code challenge
Adam Bass
Courses Plus Student 11,613 PointsLooks like this challenge is just wanting the images in an un-ordered list. So you would be wanting your images in between list items like
<li></li>
The images inside the list item tags would be something like
<img src='img/numbers-01.jpg' alt=''>
Johnathan Rowley
3,842 Pointsso the images in the un-ordered list when i list them do get them from the project folder or do have put a URL in i just kinda confused bear with i very new to this and thank you for your time
Adam Bass
Courses Plus Student 11,613 PointsThe images for the code challenge are listed at the top in the challenge task area. They are "numbers-01.jpg","numbers-02.jpg", and "numbers-06.jpg".
Johnathan Rowley
3,842 Pointsok i tried using the img element but it still does not show
Adam Bass
Courses Plus Student 11,613 PointsAre you including the folder the images are located in as well? You would want something like <img src='img/numbers-01.jpg' alt=''>
Johnathan Rowley
3,842 Pointsstill nothing sorry
Adam Bass
Courses Plus Student 11,613 PointsStrange. Can you post your code that is not working please? If you can post the entire code from this particular challenge from the opening section tag to the closing section tag that would help.
Johnathan Rowley
3,842 Points<img src='img/numbers-01.jpg' alt=''> thats one the other <img src="img/numbers-01.jpg" alt="">
Johnathan Rowley
3,842 Points sorry i mean <img src='img/numbers-01.jpg' alt=''>
Johnathan Rowley
3,842 Pointshonestly i even can't figure out what is wrong
Adam Bass
Courses Plus Student 11,613 PointsNice! No worries Johnathan, I'm glad I could help!
Johnathan Rowley
3,842 PointsJohnathan Rowley
3,842 PointsThank you Very Much For All Adam It Finally Worked!