What is the correct syntax of including an external script called ''custom.js? - Study24x7
Social learning Network

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18
58 followers study24x7 19 Apr 2020 10:27 AM study24x7 study24x7

What is the correct syntax of including an external script called ''custom.js?

A

<script link = 'custom.js'></script>

B

<script src = 'custom.js'></script>

C

<script href = 'custom.js'></script>

D

<script name = 'custom.js'></script>

study24x7
Write a comment
  • Nidhi Gupta
  • Correct Answer is B.
    We use href when we need to include a stylesheet and src to include js files.
    Related Questions
    500+   more Questions to answer
    Most Related Articles