It is better to use img or background?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
38 views
5aeeb111135fc049228336.jpeg
by | 38 views

3 Answers

0 like 0 dislike
Not important, but such background is not indexed. respectively, minus the traffic of the pictorial services of search engines.
by
0 like 0 dislike
For SEO better img, or if the implementation is using the background easier to do something, but just do the below img Img hide, search engines will still index
by
0 like 0 dislike
In this case, it is clear that this is not the design pictures, they are content.
So you need to use the img tag.
Control padding is a property object-fit.

Alternatively, it is possible to combine the two approaches.

image

div { backgorund: no-repeat 50% 50%; background-size: cover; } div > img { opacity: 0; }


The advantage of this approach: search engine optimization, and support for background-size is better than object-fit.
by

Related questions

0 like 0 dislike
7 answers
asked Apr 9, 2019 by AlibekKulseitov
0 like 0 dislike
2 answers
asked Jun 5, 2019 by Acaweb
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,187 answers
0 comments
40,796 users