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 Adding Pages to a Website Add Iconography

Keith Grimes
PLUS
Keith Grimes
Courses Plus Student 2,356 Points

Why background-image instead of img?

I don't understand the thinking between why Nick (or anyone) chose background-image to insert the iconography rather than inserting the images with the img tag? Can someone tell me why you would choose one over the other? Thank you in advance. Keith

have not seen the video, but my guess is because the image is not part of the content

https://stackoverflow.com/questions/492809/when-to-use-img-vs-css-background-image

3 Answers

It's all a learning process, so def keeping practicing and using trial and error. Know that we're all in this together :) And check this out: https://teamtreehouse.com/community/img-tag-vs-div-backgroundimage-in-css

Keith Grimes
PLUS
Keith Grimes
Courses Plus Student 2,356 Points

It helps somewhat, knowing that other people are struggling with the concept as well. I guess it's just one of those things I'm going to have to get comfortable with before I'll be comfortable with. :) Thanks.

Does that help you Keith?