W3C home > Mailing lists > Public > www-validator@w3.org > June 2010

Re: XHTML Validator not catching invalid attribute in CSS link tag

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 30 Jun 2010 19:56:08 +0300
Message-ID: <5783F8CAB9B8476EAC28A1FBC83D7895@JukanPC>
To: <jimlink@usa.net>, <www-validator@w3.org>
Jim Link wrote:

> I have an XHTML page that contains a typo in the "type" attribute of
> the link tag which refers to my CSS page.
> The XHTML Validator did not catch the typo.

That's because the typo did not generate a violation of the formalized 

> The page is attached.

It would have been better to post the URL. (For one thing, some e-mail 
clients may automatically remove all attachments, or specifically HTML 
attachments, due to suspected virus/spam/whatever.)

> The typo is
> type="test/css"
> rather than the correct
> type="text/css"

In the formalized syntax, which is all that a markup validator (as opposite 
to other checkers) should care about, the declared type of the attribute is 
CDATA, which effectively means any character string.

The value "test/css" does not violate even the formal requirements on media 
types, defined outside HTML and not included in formalized HTML syntax. It 
is of the form x/y where x and y are identifiers, hence of the generic basic 
format of Internet media type names. There is currently no major media type 
called test (and probably there will never be), but this is casual as 
compared with formal requirements.

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Wednesday, 30 June 2010 16:57:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:01 UTC