Help > Find missing image attributes

What does this trawl type find?

This configurable trawl type checks that all images on your HTML pages have the appropriate attributes. Using the settings dialogue, you can choose to check for:

width

The width attribute tells the browser the width of the image (in pixels) before it is downloaded, this allows pages to be rendered more smoothly while they are loading.

height

Similar to the width attribute but provides the height of the image (in pixels).

alt

The alt (alternate) content defines what text should be shown while the image is loading, when the image cannot be downloaded and as a tool tip when the mouse is over the image. This is especially important to visually impaired users, as it can be read out as a substitute for the image.

How to use this trawl type

On icon

You should make sure this trawl type is switched on. There should be a green tick next to this trawl type in the Trawl for... tab. If there is a red cross instead, click the cross to toggle the trawl type on.

This trawl type has several options contained in its settings dialog. This can be accessed by pressing the Settings link to the right of the trawl type in the Trawl for... tab. The dialog is shown below and its options are explained beneath...

The settings dialog

Above: The settings dialog


Screen shot item number 1

  

The first check box sets this trawl type to find any images which do not have a proper width attribute.

Dividing line

Screen shot item number 2

  

The second check box sets this trawl type to find any images which do not have a proper height attribute.

Dividing line

Screen shot item number 3

  

The final check box sets this trawl type to find any images which do not have a proper alt attribute.

How to solve the problems found

You can add width, height and alt to an image tag as follows:

While using the IMG tag:

<IMG src="image.gif" width="Enter width here" height="Enter height here" alt="Enter alternate text here">

While using the OBJECT tag:

<OBJECT data="image.png" type="image/png" width = "Enter width here" height = "Enter height here"> Enter alternate text here. </OBJECT>