Re: Validator bug for HTML 4.01 Strict DTD?

> I was just running a validation on some PHP-generated code to make sure
> everything was being spit out properly, and came across this one error
which
> prevented validation:
>    ... a href=http://some.link.here/ target="_blank">link text ...
> Error: there is no attribute "TARGET" for this element (in this HTML
> version)

If you go to http://www.w3.org/TR/html401/index/attributes.html you will see
a column marked "DTD". Next to the target attribute, there is an "L" in this
column. This means that this attribute is only present in the Loose dtd
(thus not in the strict DTD).

So change your DOCTYPE, and all will be well.

Best wishes,

Steven Pemberton

Received on Thursday, 21 February 2002 07:48:26 UTC