Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <script src=""></script>
Entery your personal number here:
<input id="secret"></input>
<p>The certificate below will be downloaded to your computer. No information will be stored on the server.</p>

<div id="content">
  <h2>Jill Smith</h2>
  <div id="display-secret"></div>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam quid possumus facere melius? Non dolere, inquam, istud quam vim habeat postea videro; Idemne potest esse dies saepius, qui semel fuit? Hoc est non dividere, sed frangere. Quae cum ita sint, effectum est nihil esse malum, quod turpe non sit. Duo Reges: constructio interrete. Atqui haec patefactio quasi rerum opertarum, cum quid quidque sit aperitur, definitio est. Nec vero sum nescius esse utilitatem in historia, non modo voluptatem. Nam quid possumus facere melius?

<div id="editor"></div>

<button id="cmd">Download PDF</button>



                #content {
    border: 1px solid #000;
    padding: 20px;

#display-secret {
    margin: 20px 0;

@media print {
  body {
    text-align: center;
    width: 90%;
  input {
    border: 0
  #display-secret, p {
    height: 40px;



function demoFromHTML() {
  var pdf = new jsPDF("p", "pt", "a4");

  // Printing text
  var vuejsinformation = `JQuery is a lightweight, "write less, do more", JavaScript library.`;
  pdf.text(vuejsinformation, 10, 10);

  // Printing a complete div container who has class pdfrapper
  pdfmake.html(window.jQuery("#content").get(0), {
    callback: function (pdf) {"Sample.pdf");
    x: 10,
    y: 10,


$('#cmd').click(function () {    

//get the number and display
let secret = document.querySelector('#secret');
let secretDisplay = document.querySelector('#display-secret');
secret.addEventListener('input', function (evt) {
  secretDisplay.innerHTML = this.value