W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: Treatment of <script>

From: Gary L Peskin <garyp@firstech.com>
Date: Fri, 10 Nov 2000 08:33:52 -0800
Message-ID: <3A0C2370.3A5509AA@firstech.com>
To: Hubert Kauker <Hubert.Kauker@Stinnes.de>
CC: html-tidy@w3.org
Hubert Kauker wrote:
> 
> Hello all.
> 
> 1. A script defined after the <body> of a document, is silently moved inside.
> Do you think that is ok?
> I have a few webpages where I'd rather prefer the scripts stayed where I put them to
> ensure they are executed after the body's onLoad event.
> See the sample below.

According to the latest HTML spec at
http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1

"The SCRIPT element places a script within a document. This element may
appear any number of times in the HEAD or BODY of an HTML document."

Doesn't say the SCRIPT element can appear outside of both.

At http://www.w3.org/TR/html4/struct/global.html#h-7.3 the only content
allowed within an HTML tag is HEAD and/or BODY, not SCRIPT.

Gary
Received on Friday, 10 November 2000 11:34:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT