Microsoft DTDs (was: HTML Validation Service - Better Explanation/Link - What document types?)

On 20.04.01 at 16:45, Shenan Hawkins <shenan@ims.ca> wrote:

>I went to validate my page (http://cr915983-a.hnsn1.on.wave.home.com/) and
>got the following (see below). When clicking on the "explanation" link
>(http://validator.w3.org/docs/errors.html#attr-undef), it says "This is
>most commonly caused by using vendor-specific attributes without setting
>the document type appropriately."
>
>What I would like to know is, can you put a link at that spot to the
>available document types so that I can set it properly?

There are about a gazillion possible DOCTYPEs so listing all of them is not
really very constructive. What you /should/ be using is one of the DOCTYPEs
(i.e. HTML versions) defined by the W3C. You can learn more about that here
<URL:http://www.w3.org/MarkUp/>.


>I would like to be able to have the MS "hidefocus=true" on my page, and
>also have it validate correctly. Which type should I use?

This is exactly what the Validator is telling you; you've used a vendor
specific extension. HTML 4.01 doesn't have a "hidefocus" attribute on the
"A" element. This appears to be a Microsoft invention and unless Microsoft
also provides a DTD (which you reference with a DOCTYPE declaration) for
this variant of HTML (the variant that, presumably among other extension,
provides "hidefocus") there is no way this document can be valid. It cannot
be valid HTML 4.01 in any case as HTML 4.01 doesn't provide this attribute.

You could check <URL:http://msdn.microsoft.com/> for a proper DTD, but I
doubt you'll find one (any Microsoft people want to chime in here?). The
alternative is to make your own, custom, DTD that includes this attribute,
but that's not a course I'd reccomend; it doesn't promote interoperability
and it's a PITA to get right.

I reccomend you drop "hidefocus" and find an alternative way to achieve the
desired effect (most likely by using CSS) or by accepting the loss of that
particular feature.

Received on Monday, 23 April 2001 06:00:47 UTC