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 trialFrank Grillo
Front End Web Development Techdegree Graduate 16,715 PointsHow do you link icons to icon images when using a tags?
I need help linking icons to icon images and updating the href attribute to link to my personal pages.
2 Answers
Steven Parker
231,269 PointsTo make an icon, or any image, into a hyperlink you only need to enclose it within an anchor (<a>
) element and set the href value of the anchor to the URL you want to link to. For example:
<a href="http://my.website.com/profile.html">
<img src="images/myIcon.jpg" alt="My Profile">
</a>
Frank Grillo
Front End Web Development Techdegree Graduate 16,715 PointsI am looking to make social media icon images link to my personal profile pages.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsAre you just asking about how to make an image be a clickable hyperlink? If not, can you elaborate a bit and perhaps show the current code?