Dumb question, how to get CDN link to work for tests without Codepen

Hi all, trying to use a text editor instead of Codepen for one of my projects. I put the script in my head tag in my html doc but I’m not seeing it display on my page, but the rest of my html does. Any ideas?

I don’t know how to solve your problem.

Which project? What is the CDN link that you’re trying to include? Can you post the code?

Not a dumb question. I placed mine as a script tag after all the html elements in the body. I think when it tries to append the div to the body, it hasn’t yet loaded so the script fails.

Product Landing Page, here’s where I’ve tried plugging the script in:

  <meta charset="UTF-8">
  <title>Product Landing Page</title>
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
  <link rel="stylesheet" type="text/css" href="productlandingpage.css">


I think you may need to also include jQuery (above that line). It’s hard to know what’s happening without seeing the console. Also, I think it is better to include your scripts at the bottom - I usually put it just above the closing tag - that way the page (html) get displayed faster.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

That worked, added if after the closing html tag. Thanks a bunch.

1 Like