Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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,219 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!