Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<div class="container-fluid">
  
  <div class="row">
    <div class="col-sm-12">
      <textarea id="editor">
      </textarea>
    </div>
  </div>
  <div class="row">
    <div class="col-sm-12" id="preview">
          </div>
  </div>
  <div>
    
  </div>
      
</div>
              
            
!

CSS

              
                textarea {
  width: 100%;
  border-radius: 2%;
  min-height: 300px;
  border-style:bold;
  box-sizing: border-box;
  border: 2px solid green;
  
}

.row {
  margin-top: 50px
}

#preview {
  width: 97%;
  border-radius: 2%;
  min-height: 300px;
  border-style:bold;
  box-sizing: border-box;
  border: 2px solid green;
  margin-left: 2%;
  margin-right: 2%;
  margin-bottom: 5%
  
}
              
            
!

JS

              
                $(document).ready(function(){
  $("a").attr('target', '_blank')
var initial =`# Introduction to Javascript
## A look at variables

This section will simply cover the basics. For a thorough study of JavaScript, please visit [Mozilla Firefox](https://developer.mozilla.org/bm/docs/Web/JavaScript.)

In order to declare a variable in Javascript, you need to use the keyword var. For example, 

\`var mytime = 20\`

We have set the variable 'mytime' to 20. We can the use this in a conditional statement:

\`\`\`
//print time if it is greater than 20

if(mytime > 20){
onsole.log(mytime);}\`\`\`

This has been **a great introduction**. In future, we shall learn more about these things:

1. 'this' in Javascript
1. the 'let' keyword
1. JS design patterns

As they say 

>Adios

![Javascript](https://www.javatpoint.com/images/javascript/javascript_logo.png)
`;
$("#editor").val(initial);
$("#preview").html(marked(initial));
$("#editor").keyup(function()
                                                                                             {var h = $("#editor").val();
$("#preview").html(marked(h))
  });

});

              
            
!
999px

Console