W3C home > Mailing lists > Public > www-validator@w3.org > November 2004

Re: some problems II

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Wed, 03 Nov 2004 21:43:45 +1100
Message-ID: <4188B661.7070400@iinet.net.au>
To: hapaaso@pp.inet.fi
CC: www-validator@w3.org

hapaaso@pp.inet.fi wrote:
> Dear Sirs and Madams
> Regarding my inquiry listed below I would like to add that I presume your help is free. If using your services costs, I would like to know it before you take any action.

Yes, it is.  Most of us subscribed to this list are volunteers that have 
spare time to offer advice to those that need it, like yourself.

>>>Line 78, column 36: there is no attribute "ALIGN"
>>><table border="0" width="97%" align="center">

>>> You have used the attribute named above in your document, but the
>>> document type you are using does not support that attribute for this
>>> element. This error is often caused by incorrect use of the "Strict"
>>> document type with a document that uses frames (e.g. you must use the
>>> "Transitional" document type to get the "target" attribute), or by
>>> using vendor proprietary extensions such as "marginheight" (this is
>>> usually fixed by using CSS to achieve the desired effect instead). 

That error message explains the problem quite well.  It means that the 
align attribute is not defined for the table element with the DTD you 
are using, and it cannot be used there.  Check which DTD you are using, 
but it is most likely, based on this error, that you are using a HTML 
4.01 Strict or XHTML 1.0 Strict DTD.  HTML 4.01 Strict is the best DTD 
to use until XHTML is better supported by browsers, and it means you 
cannot use most presentational elements and attributes.  The recommended 
way to handle this is to remove all three of those presentational 
attributes (border, width and align) and use CSS to control the 
presentation.  If you must use those attributes, then you need to use a 
transitional DTD.

>>>My own comment
>>>Does this mean that officially I can't center a table?

It means that you can't use the align attribute to center a table when a 
Strict DOCTYPE is in use.  You can, and should use CSS to handle all 
presentation like alignment, width and borders.  eg. the following CSS 
will create the same effect that those attributes will:

table { border: 0; width: 97%; margin-left: auto; margin: right: auto; }

Note: Setting the left and right margins to auto with CSS is the way to 
center a block or table.  Using the 'align' property in CSS will 
effectively center the text within each of the cells of the table.

>>>Line 80, column 26: there is no attribute "WIDTH"
>>><tr><td rowspan="3" width="15%" valign="top" class="reunukset">

That is an equivalent error message.  Remove width and valign from the 
the <td> and replace it with CSS.  You can use the class name you've 
added there to apply the styles. eg.

.reunukset { vertical-align: middle; width: 15%; }

>>>Line 84, column 123: there is no attribute "TARGET"

The target attribute is also not allowed with a Strict DTD.  You should 
also note that if it is being used to open a new window, that can cause 
usability issues, that can confuse your site visitors.  target should 
only be used when you are using frames, as a legitimate frame target 
that will not force a new window, and in such cases, you need to use a 
Transitional DTD.  Most of the time, the target attribute should not be 
used, and there is no CSS that can replace it.

>>>Line 84, column 198: there is no attribute "BORDER"
>>>...ne72_100sint.gif" name="pic1" border="0"></a></td></tr>

Again, remove the border attribute and replace it with CSS.  It looks 
like an img element within a link, so the following CSS should work for you.

a img { border: 0; }

>>>Line 84, column 201: required attribute "ALT" not specified
>>>...2_100sint.gif" name="pic1" border="0"></a></td></tr>

The alt attribute must be specified for all images.  It should serve as 
an alternative to the image that is suitable to be read by screen 
readers, or displayed with images are disabled, unsupported, just 
unnavailable.  Without knowing what the link is for, or what the purpose 
of the image is, I cannot offer any advice about suitable alt text, but 
there are some good documents available that explain how to write good 
alt text available.

>>>Line 107, column 61: "IMG" is not a member of a group specified for any attribute
>>>...g name="kopio_valikko72_100sint" img

This looks like, though I cannot be sure, that you have forgotton to 
close the previous start tag, nor open the img element.  As a guess, 
without seeing the full source, I assume it should be fixed up like this:
...g name="kopio_valikko72_100sint"><img 

>>>Line 109, column 55: "AREA" is not a member of a group specified for any attribute
>>><area shape="rect" alt="suomi" coords="0,0,70,20" area href="index.html" 

This is the same problem.  Fix it like this:
<area shape="rect" alt="suomi" coords="0,0,70,20">
<area href="index.html"

Lachlan Hunt
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web
Received on Wednesday, 3 November 2004 10:44:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:43 UTC