Where should your javadcript code placed
Answers
Answered by
6
Hi
You can place JavaScript code within html document wherever you want.. but placing it within head tag or at the end of body tag is good practice..
However if you will place your JavaScript files in head tag then those files will load first and page rendering will be blocked.. so one should always try to place their JavaScript at the end of body tag unless you want to something like check browser.. platform etc.. before loading website content.
Answered by
5
<script>
..........
</script>
By putting the script tag,you can start your JavaScript coding in html.
Hope it helps:(
Similar questions
History,
6 months ago
Social Sciences,
6 months ago
Business Studies,
6 months ago
Math,
1 year ago
Physics,
1 year ago
Math,
1 year ago