The ISA-Bus

One blog to bind them all.

Images, Captions, and Google

We are used to seeking an image’s caption below it, not above it. If we see a column of images and captions, as on a web page, we will tend to assume that each caption, unless followed by a colon, describes the image above it.

Unfortunately, Google works otherwise. In indexing images, Google pays more attention to the text before an image than to text following it. This regularly leads to incorrect indexing.

What do? Where possible, use descriptive file names, title and alt tags. If these three strings match, they will probably weigh more than any text above the image.

The core problem is of course that HTML never had a good way to associate a text with an image in a way that is readable both for humans and bots. HTML5 introduced the figure and figcaption elements. But any positioning must then be done not for the image but for the figure, which is rather unwieldy.

A simple solution is to inclose the image in a table and give the table a caption. The caption can easily be included before the image yet be made to display under it, either through CSS or a simple <caption align="bottom">. A table can be handled just like an image, can be aligned left or right for example.

This will make HTML purists howl, but it works.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: