Indicate img elements that miss alt attribute

The following CSS gives a red outline to any img having a missing or blank alt attribute:
img[alt=''] {
outline: 8px solid red;
If you are using Visual Studio Code, you can install the webhint extension. It will automatically detect the issue and show the details when you hover on the element.
webhint image
webhint image