[thelist] NAME not valid for IMG tag in 4.01 transitional? What now?

aardvark roselli at earthlink.net
Sat Feb 17 07:45:48 CST 2001


> From: AtdtXav <atdtxav at yahoo.com>
>
> I use a name attribute (name="screen") in
> http://www.vedbok.com/films/pizza , for instance, as an
> identifier for a javascript onClick to switch images on a page. 
> Works wonderfully, but it's the ONLY thing not validating with
> the WDG validator, using the 4.01 trans DTD.

it's legal in 4.01, just not 4.0... that's one of the reasons they made 
the 4.01 update, it would have killed too many good efforts at 
standards since people won't give up their 'name' attributes in 
images...

how can i prove this?  do two things...

look at the HTML 4.01 attributes list at:
http://www.w3.org/TR/html401/index/attributes.html

(as comparison, you'll see 'name' is not valid for <img> at:
http://www.w3.org/TR/1998/REC-html40-
19980424/index/attributes.html)

also, i ran your page through the W3C validator:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.vedbok.co
m%2Ffilms%2Fpizza

what this showed me is that you are trying to validate to HTML 4.0 
Transitional, not 4.01 Transitional...

IOW, you got your DTD wrong... you should fix that...

> PS I'm kind of at a loss as to how to proceed to make the site
> (www.vedbok.com) not cause NS 4.01 to have a snit-fit and nearly
> crash.  As one might expect, it works ideally in IE, it's
> completely valid code, and yet netscape.... *screams in
> frustration*

without pawing through your code, i'd say be careful in your use of 
<div>s... maybe don't use them at all...





More information about the thelist mailing list