- Understanding the HTML Script Tag in JavaScript
- Script Tag Quiz 6 questions
- Comprehensive Guide to External JavaScript in HTML
- External JavaScript Quiz 6 questions
- Understanding the Element and JavaScript in XHTML Files
- XHTML Files Quiz 6 questions
- Manipulating HTML and Outputs with JavaScript
- JavaScript Comments
- Output from a JavaScript Program
- Manipulating HTML and Outputs Quiz 5 questions
- Example of a Simple JavaScript Program
- Simple JavaScript Quiz 6 questions
Quiz Question 1 of 6
In a large-scale web application where code maintainability and separation of concerns are crucial, which approach would be most effective for including JavaScript?
Choose the correct answer below:
-
A
Inline JavaScript, embedding the necessary code directly within event handlers.
-
B
Internal JavaScript, placing
<script>
tags within the<head>
section of each HTML page. -
C
Internal JavaScript, with multiple
<script>
tags scattered throughout the HTML document. -
D
External JavaScript, linking to a central
.js
file hosted on a content delivery network (CDN).