Re: Treatment of <script>

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 UTC