Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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 type="text/x-mathjax-config">
  MathJax.Hub.Config({
    menuSettings:{
      zoom: "Hover",
      zscale: "150%"
  
    },
    MathEvents: {
      hover: 100 
    },
    MathZoom: {
      styles: {
        "#MathJax_Zoom": {
          "background-color": "#ddd"
        }
      }
    }
  });
</script>

<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

<div id="content">
  <h1>Quadratic Equations</h1>
  <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are:</p>
  <p>$$x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$</p>
  <h2>Straight line equations</h2>
  <p>The equation for a straight line is usually written as \(y = mx + c\)</p>
  
  <section id="pisaexamples">
    <h2>Some examples</h2>
    <p>A paragraph with an inline equation: \(s = \frac{100}{9.58} = 10.43841336\). Notice how the fraction has been scaled down, so that it fits within a line of text. Even complicsted equations work quite well. \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\) still fits in the paragraph. Sort of.</p>
    <p>And a block equation:</p>
    $$s = \frac{100}{9.58} = 10.43841336$$
    <p>\(s = \frac{100}{9.58} = 10.43841336\)</p>
  </section>
  <section>
    <h2>Long Numbers</h2>
    <p>Styling for long numbers should be done with MathJax too. If you want commas in long numbers, adding them manually would result in unwanted spaces e.g. \(100,000,000\). one way around this is to enclose the commas in curly brackets - \( \{{,}\} \implies 100{,}000{,}000\) </p>
  </section>
  
  <h2>Hover</h2>
  <p>Oh yeah, dont forget to hover over the equations to zoom in.</p>
</div>


              
            
!

CSS

              
                @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,600);

body{
  background-color: #eef;
  color: #446;
  
}

#content {
  font-size: 1.2em;
}

.MathJax_Display {
  font-color: #fff;
  font-family: 'Crimson Text', serif;
  margin: 0;
  width: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console