Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using alt tags with div for SEO reasons?

Tags:

html

css

seo

At the moment I'm using div's and 'background-image' in css to put in my images. However, how do I use these to my advantage regarding SEO? I used to use alt-tags a lot as part of my SEO strategy. How do you do this with div's. Or do you recommend just using img src in relevant parts?

like image 541
user1548544 Avatar asked Jan 16 '23 21:01

user1548544


1 Answers

At the moment I'm using div's and 'background-image' in css to put in my images.

Do that for background images. Don't do that for content images.

However, how do I use these to my advantage regarding SEO?

Write (accessible) content for people. Trust search engines to find it.

I used to use alt-tags a lot as part of my SEO strategy.

Hopefully they are good alt texts (and hopefully you mean attributes, not tags).

Or do you guys recommend just using img src in relevant parts?

Content images should use <img> elements.

like image 124
Quentin Avatar answered Jan 25 '23 23:01

Quentin