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 Creating HTML Content Add Social Media Links

link to images

always having problems with the image links. What did I wrong?

3 Answers

 <a href="http://www.google.co.uk" alt="Google">Google</a>

hope that helps

Hi Muhammad,

Where's the image element?

Jeff

HI Jochen,

Try something like:

<img src="img/facebook-wrap.png" alt="facebook image">

First off, make sure that you are linking to the correct file name and extension, it may seem simple but I don't know how many times an image broke just because I missed a character or used the wrong extension.

Is the image relative (located within one of your file directories) or is it absolute (located on a website)?

If the image is relative, are you linking to the correct file directory? Are you using leveling to access the correct directory?

<img src="images/image.png" alt="an image"> // goes down a level ( to the images folder) from the folder where your markup is located.
<img src="../images/image.png"  alt="an image">  // notice how the ../ jumps you one level up from the folder where your markup is located.

For more information on relative and absolute paths, you can read about it here : http://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/