Report Bug

QusWhich of the following is true about the placement of JavaScript in HTML? QusHTML में जावास्क्रिप्ट के स्थान के बारे में निम्नलिखित में से कौन सा सत्य है?


A. JavaScript must always be placed inside the <head> tag
B. JavaScript can be placed either in the <head> or <body> tag
C. JavaScript can only be placed in external files
D. JavaScript cannot be placed in the <head> tag


Solution
B. JavaScript can be placed either in the <head> or <body> tag



Explanation
JavaScript can be placed either in the or tag of an HTML document. The placement depends on when you want the script to execute: placing it in the will run it before the content loads, while placing it in the ensures it runs after the content.
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad