Optimization vs Alt Text. Can I have both?

I have a little problem when designing / optimizing a web page.

I know that it is good to have ALT text for images. I had a set of 10 small images and alt text for each. Please note that there is an urgent need to ensure that the first visitor sees the website as quickly as possible.

But I thought 10 HTTP requests? So, what I did was combine all the images into one image and have 10 sections and set the background image and background position so that it seemed the same to the user when in fact only 1 HTTP request was made. I think I'm right in saying that 10 (unnecessary) HTTP requests are expensive.

But I can no longer read the ALT text! Because it is not an image.

Can I have the best of both worlds?

One optimized image has only 1 request, BUT put some text along with this image (for SEO and reasons for reading from the screen)?

PS The page design is so stupid, there is no actual text. I'm just trying to enter text so that search engines read something relevant. I was given an SEO job. So I'm just trying to follow some basic recommendations. It is a pity that they will not allow me to touch the design itself.

Edit

I set the background of the tag itself <img>instead <div>. Now that this is an image element, I set the text to ALT. Then I set the attribute srcto transparent 1x1 GIF. I'm so stupid to lose sight of this opportunity: D

+3
6

title DIV . IMG PNG GIF, CSS, IMG alt title , .

CSS :

http://www.alistapart.com/articles/sprites

+1

, : , 10 , :

  • , ,
  • , " " ..
  • ; , alt
  • img
  • , , , - ?
    • , ( "" "" ), 2, , "", 3 - , 2, 3, , , ""


, ..:

  • alt, ,
  • , , ? , "" , , "alt" .


( ) , :

+7

1 , - ( SEO )?

, . Image SEO . , (DIVs, , ) title . , SEO. : ( - , ) ( alt .)

, , .

+1

CSS. , , , alt.

, , style img, CSS, alt.

0

? , . , HTTP .

0

"title" ( , div, ), , - .

"" ? , ? -, , ..

, input a,

, , CSS - , " "?

-1
source

Source: https://habr.com/ru/post/1726781/


All Articles