JavaScript - Head or body?

Jaiem's picture

They have: 1,191 posts

Joined: Apr 1999

Is it better to put JavaScript in the <HEAD> or <BODY> section of an HTML page?

Thanks

------------------
ArtsNFlies.com
Original art, hand tied flies, unique books and gifts, free sweepstakes and MORE!

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

I think it does not really matter.
To keep your code readable I recommend you put your JS together in the <Head>, though.

------------------
Jack Michaelson
[email protected]
--> ! click here for my profile ! <--

[This message has been edited by Jack Michaelson (edited 08 December 1999).]

Shakespeare: onclick || !(onclick)

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.