W3C home > Mailing lists > Public > www-validator@w3.org > July 2001

Re: image name/id

From: Christian Smith <csmith@barebones.com>
Date: Sat, 7 Jul 2001 07:33:06 -0400
To: Alexander Shpack <oshpack@viva-solutions.com>
cc: www-validator@w3.org
Message-ID: <20010707073307-r01010700-f986f649-0910-0108@165.247.13.210>
On Friday, July 6, 2001 at 05:35, oshpack@viva-solutions.com (Alexander Shpack) wrote:

> Sorry for my bad english...
> 
> I validate my page.
> SGML parser generate a error
>      *  Line 35, column 64:
> 
> .... width="20" height="16" alt="" name="k1"><a href="consulting/ ...
> ^
> 
>        Error: there is no attribute "NAME" for this element
> (in this HTML version)
> ^^^^^^^^^^^^^^^^^^^^^^
> My DOCTYPE is
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
>          "http://www.w3.org/TR/REC-html40/loose.dtd">
> 
> 
> In http://www.w3.org/TR/REC-html40/loose.dtd document IMG tag have a 
> NAME property. This property present in latest HTML 4.0 specification, 
> but validator check my page according 
> http://www.w3.org/TR/1998/REC-html40-19980424/ old version of HTML4.0 
> specification :(((
> Where is True?

The problem is that the DTD at the URL 

<http://www.w3.org/TR/REC-html40/loose.dtd>

is now the DTD for HTML 4.01 Transitional and not the older HTML 4.0
Transitional. I've been complaining about this for a -long- time ;-).

There is no NAME attribute for IMG in HTML 4.0. This was added in HTML
4.01 to provide backwards compatibility with browsers which can't handle
using the ID attribute. If you change your DOCTYPE to HTML 4.01
Transitional the error will go away.

-- 
Christian Smith  |  csmith@barebones.com  |  http://web.barebones.com

He who dies with the most friends... Is still dead!
Received on Saturday, 7 July 2001 07:33:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:59 GMT