HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Jade. In CodePen, whatever you write in the HTML editor is what goes within the &lt,body&gt, tags in a basic HTML5 template. So you don’t have access to higher-up elements like the &lt,html&gt, tag. If you want to add classes there, that can effect the whole document, this is the place to do it. In CodePen, whatever you write in the HTML editor is what goes within the &lt,body&gt, tags in a basic HTML5 template. If you need things in the &lt,head&gt, of the document, put that code here. JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5. These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library. You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we’ll add it, in the order you have them, before the JavaScript in the Pen itself. If the script you link to has the file extension of a preprocessor, we’ll attempt to process it before applying. You can also link to another Pen here, and we’ll pull the JavaScript from that Pen and include it. If it’s using a matching preprocessor, we’ll combine the code before preprocessing, so you can use the linked Pen as a true dependency. As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data… anything you want. You can even edit them anytime, like any other code on CodePen. We’re all for progressive enhancement, but CodePen is a bit unique in that it’s all about writing and showing front end code, including JavaScript. It’s required to use most of the features of CodePen. Source.

Menu
whatsapp button