Javascript Developer JSE 40 01 · Free Practice Question Easy

Question 7

Q204 - Basics


What HTML tag is used to indicate that we are embedding JavaScript code?


  • A
  • B
  • C
  • D
Reveal correct answer

Correct answer: C

Explanation

Topic: HTML <script> tag


Try it yourself:


Explanation:

The HTML <script> tag is used to define a client-side script (JavaScript).

https://www.w3schools.com/html/html_scripts.asp


(There is a similar question Q304.)


Q204 (Please refer to this number, if you want to write me about this question.)

A. The tag is not a valid HTML tag either. There is no specific tag named that is used to indicate the embedding of JavaScript code in an HTML document. This choice is incorrect.

B. The tag is not a valid HTML tag. There is no such tag in HTML that is used to indicate the embedding of JavaScript code. Therefore, this choice is incorrect.

C. The tag is used in HTML to indicate that we are embedding JavaScript code within the HTML document. It is the correct choice for including JavaScript code in an HTML file.

D. The tag in HTML is used to define the main content of the document. It is not specifically used to indicate the embedding of JavaScript code, so it is not the correct choice for this question.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need