You can link scripts and style-sheets from another server like CDN libraries or your local files (relative paths to your project’s root or current folder)
The CSS linkage is done via a style tag:
<link href="yourfile.css" rel="stylesheet" type="text/css">
This tag should be placed before the closing
And the JS linkage is done using a script tag:
Preferably before the closing
In my HTML file:
<!DOCTYPE html> <html> <head> <title>randomquote</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"> <link rel="stylesheet" href="style randomquote.css"> </head> <body> . . . <script src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="randomquote.js"></script> </body> </html>
What am I doing wrong?
might want to review this line of code
<link rel="stylesheet" href="style randomquote.css">
Also it’s better if you move all the scripts to be the last children of the body element. Basically the scripts have to be immediately above the
</body> closing tag.
This is because sometimes it could take a while to load the scripts and you would want to reduce the displaying time of the page to the minimum.