When you write code on codepen do you need to use an HTML boilerplate

I’ve been writing code on Sublime text and I learned that you always have to use a boilerplate when writing HTML.

I can’t seem to find the answer on google so I figured I’d ask

Codepen creates the boilerplate behind-the-scenes for yo. Anything you write in the HTML section is actually what you would put in between the body tags. The CSS section holds all of your CSS and the JavaScript section holds your JavaScript. Anything that normally goes between the head tags needs to go in a special place called “Stuff for head” under the HTML settings (gear icon).

Once you have written your pen, you can use the Export feature which creates a zip file containing all the relevant files (.html, .css, .js) with all the applicable code in each. There will be an index.html which will look like the boilerplate you are used to seeing.


Thank you that cleared up a lot of confusion for me.