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!
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
Question about image URL in CSS
I should have asked this earlier. Why are the image urls for Twitter, etc in the CSS file? Doesn't that keep screen readers and search engines from accessing them?
Gergely Bocz14,244 Points
Hi Theodore Blanner!
You are right, that if you want an image to be accessible to screen readers and want to optimize for SEO, then you should put it inside your HTML with the appropriate alt attribute.
However, if it's only for the looks and the image itself is not part of your content -or the image itself is not even yours-, then there is no point optimizing it for search engines, since SEO only cares about the original content you have.
I hope it answers your question.
Hey, thanks for the quick response! I don't understand much about how screen readers work at this point so I'd like to understand this: If an image is a link to a social media account, should I put the image in html as opposed to a CSS file? That's pretty much the only thing that made me curious. Thanks again, man!