0

I have image tag

If the user has disabled the download of pictures or for some reason they did not load properly, then place icons should appear comfortable text, like this: Example

And yet, there may be an image of circles, transparent in the middle, it means that simply the text under the picture will not post.

What there are ways of making such alternative text - NOT using JS,it test task and it says there is solution wothout JS ?

Property 'alt' - unusable because I must set text with color (Attached image)

Geray Suinov
  • 3,521
  • 3
  • 16
  • 19
  • This would be possible, but only with JavaScript. I suggest not doing this though. Users who disable downloading images should just see a really simple placeholder to indicate that there should be an image there – Joeytje50 Jan 28 '14 at 22:13
  • @Joeytje50 I must doing it without javascript :) – Geray Suinov Jan 28 '14 at 22:15
  • possible duplicate of [Is it possible to combine a background image and CSS3 gradients?](http://stackoverflow.com/questions/2504071/is-it-possible-to-combine-a-background-image-and-css3-gradients) – Geray Suinov Jan 29 '14 at 17:59

2 Answers2

0

This is impossible to do without using JavaScript. This shouldn't really be a big problem though, since users who disable downloading images should just see a really simple placeholder to indicate that there should be an image there.

There's no point in putting in too much effort for that handful of people that doesn't want to download images though. The alt attribute is mainly for web-crawlers such as search engines, and for pasting text with the image in it (if you paste an image that had an alt value set into a plain-text textarea, it will automatically be converted to its alternative value).

Joeytje50
  • 18,636
  • 15
  • 63
  • 95
0

You must do this with javascript if you cant use the alt property.

user3246890
  • 139
  • 7