This site is no longer updated but kept as it still get lots of traffic. You can find more updated information about me at jenswedin.com.


Check your alt text

You want an easy way of checking for images if they have alt text or not?

I wanted an easy way of seeing if the images used on a site have alt text or not. I seemed that I did not need to look far. Only to CSS3 specs. They have added negating (The negation pseudo-class selector) support for CSS. Here is an easy way of putting a border around an image if they do not have an alt text.

img:not([alt]){border: 1px dotted #c60}

This works in Firefox, not Opera or IE which is fine with me, I only want this when developing.

One comment

  1. Works in Chrome also

Leave a comment