Attributes with no value

I have noticed that the Microsoft Visual Interdev 6.0 editor will occasionally
replace my code with it's own.  For example, it tends to remove the value of
attributes with empty values.

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

would be replaced with:

<img alt src="someimage.gif">

I don't know why it does this (I've tried asking Microsoft support if there was
a way to disable this useless feature, but they were no help).  Apparently the
generated code is not valid?!  Is that right?  When I try to validate a document
(as HTML 4.01 Transitional) with this modified code I get:

Error: "ALT" is not a member of a group specified for any attribute

Followed by:

Error: required attribute "ALT" not specified

What does it mean about "not a member of a group specified for any attribute"?
It seems to me that instead of being invalid, this should be considered as an
attribute with no value (the same as alt="").  Is there some fundamental
principle of HTML that I'm missing?  If not, then is it possible to modify the
validator to see these as the same thing, therefore allowing my document to
validate even after Microsoft has mutilated it?

Thanks,
Peter Foti

Received on Wednesday, 8 November 2000 16:00:52 UTC