How to add external CSS to codepen?

I know how to add external css to html by saving it in the same folder and putting a link tag… but since the html code in codepen isn’t a file, how do I add it? Any help appreciated.

Hello!

TL;DR; copy only your CSS and <body></body> contents to their respective tabs on your pen.

In codepen you don’t need to include the <html></html>, <head> nor <body> tags, hence the linked CSS shouldn’t be linked.

Just copy your CSS and HTML (what’s inside your body only) to the respective tabs. If you wanted to link a publicly available JS/CSS file, then you can do it through the settings of your pen.

1 Like

Ok gotcha. I guess it is the same thing after all. Just at the end copy and paste it into codepen.

1 Like