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

Missing attribute in a <script> element (Was: Re: [VE][127] Add Subject Here)

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Fri, 13 Jun 2008 09:35:21 +0300
Message-ID: <003d01c8cd1f$aacf1f00$0300000a@DOCENDO>
To: "Eglitz Multimedia Solution Provider" <info@eglitz.co.in>, <www-validator@w3.org>

Eglitz Multimedia Solution Provider wrote:

> how can i remove this eror "
> <script language="JavaScript" src="bg.js"></script>"
> from my site
> Validating http://www.hotelndeal.com/
> Error [127]: "required attribute X not specified"

By adding the required attribute. The document type definition specifies 
that the type="..." attribute is required for a <script> element.

As far as the validator is concerned, any value will do, since the 
attribute is declared with a CDATA value. In practice, people use 
type="text/javascript", which is recognized by all relevant browsers. 
According to RFC 4329 ( http://www.faqs.org/rfcs/rfc4329.html ), that 
value is obsolete; in reality, the preferred "application/javascript" 
may have more limited browser support.

Jukka K. Korpela ("Yucca")
Received on Friday, 13 June 2008 06:36:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:56 UTC