Computer Science, asked by Susan1867, 1 year ago

Where should your javadcript code placed

Answers

Answered by Anonymous
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 shardul1925
5

<script>

..........

</script>

By putting the script tag,you can start your JavaScript coding in html.

Hope it helps:(

Similar questions