5 replies [Last post]
Anonymous
Anonymous's picture
rank Guru
Guru

Hi

When validating my HTML page at http://validator.w3.org/ one of the errors that is repeated over and over is:

-----

Line 17, column 62: required attribute "ALT" not specified

... <TD> <IMG SRC="images/spacer.gif" WIDTH=113 HEIGHT=1></TD>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

-----
(obviously line and column info changes), also the > after HEIGHT=1 is coloured red.

i have tried removing all the spacer images too, but it only removes the entire banner picture at the top.

the thing is i have no idea what this actually means can someone help.

my site is a mixture of tables and css at the moment (although i am trying to get rid of the tables and use entirly CSS, but i dont have the knowledge yet

Tags:
thepineapplehead
thepineapplehead's picture
User offline. Last seen 12 weeks 1 day ago. Offline
rank Guru
Guru
Joined: 2004-06-30
Posts: 8921
Points: 13

validating errors

alt = alternate image text.

For spacers, use this:

<img src="blah.gif" alt="">

briski
briski's picture
User offline. Last seen 19 weeks 3 hours ago. Offline
rank Elder
Elder
Timezone: GMT+1
Joined: 2004-02-16
Posts: 1066
Points: 0

validating errors

Which doc type are you validating against?

The obvious thing is you don't have an alt attribute on the img tag and it's not closed.

<IMG SRC="images/spacer.gif" WIDTH=113 HEIGHT=1 alt="" />

thepineapplehead
thepineapplehead's picture
User offline. Last seen 12 weeks 1 day ago. Offline
rank Guru
Guru
Joined: 2004-06-30
Posts: 8921
Points: 13

validating errors

Also, you need to wrap the height and width declarations in "quotation marks"

Anonymous
Anonymous's picture
rank Guru
Guru

validating errors

cheers people, i put in the alt tag and all is ok now

Anonymous
Anonymous's picture
rank Guru
Guru

validating errors

A spacer gif? Inside of a table element? Hrump!!! [-X