General codepen usage

Why do some people use script tag separately in codepen when they have JS window

If I had to guess, I’d say that they copy-pasted from somewhere else.

1 Like

Ok ,thanks for the response

Often use the script tags in codepen to add CDNs of various frameworks, like bootstrap, jquery, etc…

But you don’t need to. If you click on the little gear you can add CDNs on the backend. It’s cleaner and Codepen will export the links ready made.

The JS window should just be your own JS.

If you wish to move your pen out of Codepen and onto
a website or other coding site that has no JavaScript Preprocessor,
you need to call those cdn’s with script tags :slight_smile:

@ Tirjasdyn i will have to try
exporting … thanks for the info :slight_smile:

So the CDN has the whole JS code of our pen and Xiija your codepen account has different theme did you do that or codepen has that feature

A CDN is a online host for various frameworks. So if you want to use bootstrap, you need to link to its CDN from Codepen. You can do this by clicking the gear and click on the CSS tab, then doing a search for Bootstrap at the bottom or pasting the link there.

Codepen themes for your site can be changed with a pro account I believe. I’ve only organized mine…I need to make a few pens to fix mine up.

@Xiija export is at the bottom left of your pens. This usually attaches all the head info and links your JS and CSS windows.

@

topcoder
If you go to your profile page, and click ‘edit Profile’ in the top right corner,
you should see 5 tabs … click the ‘Customize’ tab, and you can use the CSS
from a pen to style your profile page.

I don’t have a PRO acct, i think they get more options?

here is the one i am using, you can fork it, and change it how ever you like :slight_smile:
https://codepen.io/Xiija/pen/KbbaPO

and the actual Profile…
https://codepen.io/Xiija/#