How to "import" libraries

  • The easiest way to use a JS library is just linking with a <script> tag
  • This lets you pull in somebody else's code from somewhere on the internet
  • In your HTML, CSS can go directly into a <style> tag
  • CSS can also be in an external file with a <link>
  • To use a CSS framework, just link the file with a <link> tag
  • You may see some examples online with import but you need some special tools for those
<body>
    ...
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</body>

11 / 32