alt. attribute: 1. I cannot figure this out. Use CSS styling instead. Remember, Google treats the information within the alt attribute as regular web page content. Value is in a space-separated list: value is either the only attribute value, or is a whole value in … The class attribute, which is what you'll select the element with in JavaScript. You’ll notice that the alt attribute is empty in this situation. Links. Brian Harnish July 11, 2018 7 min read. The image is a key part of the content; the alt attribute gives a textual equivalent or replacement for the image. Additionally, search engines may have a problem crawling an image. The src attribute must be present, and must contain a valid non-empty URL potentially surrounded by spaces referencing a non-interactive, optionally animated, image resource that is neither paged nor scripted. If the src attribute is set and the alt attribute is set to a value that isn't empty. Using