Solution 1 :

Possibility:

Adding script from another HTML file: No

Adding script from other Javascript File: Yes


Syntax: to load external JS:

<script src="myscripts.js"></script>

Hope, It Helps.

Problem :

When writing web pages I often end up with a lot of script ot link tags in the head of each html file.
Something like this,

<link rel="stylesheet" href="css/master.css">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Questrial"/>
<script type="text/javascript" src="js/moment.js"></script>
<script type="text/javascript" src="js/index.js"></script>

Is there a way to consolidate this into one line that loads all of them from a separate file, something like this <link rel="" href="libraries.html">? Or maybe have one <link> that loads both other links? <link rel="stylesheet" href="css/master.css","//fonts.googleapis.com/css?family=Questrial"?

I looked into doing this with a <link> but I didn’t see any obvious way.

Comments

Comment posted by epascarello

In HTML? No there is not

Comment posted by import

If you linked to a JavaScript file, you could use a bunch of

By