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

Social-links

Hello, how do I add a social icon to the link to the social web page? This is what I have so far. do I put the "img src" inside the <li> attribute, if so how?

<li><a href="https://www.linkedin.com/jobs/search/?geoId=&keywords=&location=" class="social linkedin">LinkedIn</a></li> <img src="https://img.icons8.com/doodle/48/000000/linkedin-circled.png">

1 Answer

Steven Parker
Steven Parker
231,248 Points

You probably want to put the img inside the "a" tag, next to the word "LinkedIn".

If that's not the whole story, please provide a link to the course page you are working with.

Hello, here's the link to the page I'm working on file:///C:/Users/qasim/Desktop/Techdegree%20Profile%20V2/Techdegree%20Profile%20New/Experience.html and I just put the "img" tag inside the "a" tag and I it still shows the error. The LinkedIn icon shows but you can't click on it to open up the link.

Steven Parker
Steven Parker
231,248 Points

That URL is for a file on your machine, it's not a link reachable from the internet. But when I put the image inside the <a> element, clicking on it works. Does your edited code look like this?

  <li>
    <a href="https://www.linkedin.com/jobs/search/?geoId=&keywords=&location=" class="social linkedin">
      <img src="https://img.icons8.com/doodle/48/000000/linkedin-circled.png"> LinkedIn</a>
  </li>