Re: image name/id

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 UTC