What’s the difference between HEAD tags and BODY tags?
most HTML books only ‘briefly’ mentions <head> and <body> tags…but they just go away really fast.
Do they affect how browsers render web pages?
Also, do they affect the order in which javascripts are run?
(I mean, if I have a javascript inside a <head> tag, would it run BEFORE another javascript inside <body> tag? Even when <body> came BEFORE <head>?)
This is too confusing–I haven’t ever used a head/body tags, but i never had any trouble with it.
But while reading Jquery tutorial, I saw people recommending putting some codes inside <head> and the others inside <body> tags.
Thank you!!!
Generally javascript code will function in the head before code in the body. The head section is usually used to contain information about the page that you dont neccessarily see like the meta keywords meta description or title of a page. You would also link to any external files like .css .js files in the head section as they need to load before the page is displayed.
Anything in the body section is what you would expect to be see on screen.