0

Is java script or html code runs first after the page loads

I find it through alert tag in JavaScript

15th May 2017, 10:10 AM
Varun Kumar
Varun Kumar - avatar
4 Answers
+ 2
It depends on where you put the Javascript. If the javascript is in a script tag at the end of the body, the browser will read html and create the dom, then it will execute javascript. Even if it is in the head of the document, i think Html comes first. If you use javascript libraries that bind values to html, the browser will read it all together and crack if a binding is not correct. Hope I've been of some help.
15th May 2017, 10:31 AM
Alessia Amitrano
Alessia Amitrano - avatar
+ 2
I think html...
15th May 2017, 10:23 AM
Vishnu ks
Vishnu ks - avatar
+ 2
No @varun html runs first as also told by @alessia
15th May 2017, 10:33 AM
Vishnu ks
Vishnu ks - avatar
0
not like that if you insert script tag before ur HTML code HTML code may run later the page loads @vishnu ks
15th May 2017, 10:30 AM
Varun Kumar
Varun Kumar - avatar