Pen Settings



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


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.


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.


                <!-- See for a more in-depth demo -->
<!-- and for a reference -->

<!-- Wrap the entire slide show in a div using the "reveal" class. -->
<div class="reveal">
  <!-- Wrap all slides in a single "slides" class -->
  <div class="slides">
    <!-- Each section element contains an individual slide -->
    <!-- Nested sections produce vertically connected slides -->
    <section id="title">
        <h1>Presentation title</h1>
        <p class="fragment fade-up">We're going to talk about some aspect of...  </p>
        <div class="fragment fade-up"><h2 class="fragment shrink">compression</h2></div>	
        <h4>This presentation is for assessment in<br/> 
          Unit 2 of Computing and App Design at FCC 2017

    <section id="show-a-link">
      <h1>A Kodak test image</h1>
      <!--  Note the use of data-src to aid Lazy Loading of large external media -->
      <!--    -->
      <img data-src="" num="08" height="300px" id="test-img">
        <a href=""></a>
      <p>This is much less contraversial than 
        <a href="">Lenna...</a>
      <aside class="notes">
        Speaker notes are added like this

      <h1>Code & Math Slide</h1>
      <p>Some code follows </p>
    $(function () {
      $('a').click(function(event) {
        alert('Thanks for visiting!'');
      <p> Test inline maths: $e^{\mathrm{i} x} = \cos(x) + \mathrm{i} \sin(x)$  </p>
      <h1> Internal links </h1>
      <p>Back to the <a href="#/title">top</a>? </p>

        <h1>The End</h1>
        <p>Any Questions?</p>	
          <li> <a href=""> CSP Unit 2</a></li>
          <li> <a href="">CS Field Guide: Compression</a></li>
          <li> <a href="">Wikipedia: Lenna</a></li>
          <li> <a href="">Kodak Lossless True Color Image Suite</a></li>




                var cdn = '';
  controls: true,
  progress: true,
  history: true,
  center: true,
  help: true, // Show help overlay when ? is pressed
  transition: 'convex', // default / none / slide / concave / convex / zoom
  transitionSpeed: 'default', // default / fast / slow
  backgroundTransition: 'default', // default / none / fade / slide / convex / concave/ zoom
  dependencies: [ // Comment in/out as needed
    { src: cdn+'lib/js/classList.js', // Cross-browser shim that fully implements classList
      condition: function() { return !document.body.classList; } },
    // { src: cdn+'plugin/markdown/marked.js',   // Interpret Markdown in <section> elements [1]
    //   condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
    // { src: cdn+'plugin/markdown/markdown.min.js', // Interpret Markdown in <section> elements [2]
    //   condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
    { src: cdn+'plugin/highlight/highlight.min.js', async: true,  // Syntax highlighting <code> elements
      callback: function() { hljs.initHighlightingOnLoad(); } },
    { src: cdn+'plugin/zoom-js/zoom.min.js', async: true}, // Alt+click zoom on elements
    { src: cdn+'plugin/notes/notes.min.js', async: true}, // Speaker notes
		{ src: cdn+'plugin/math/math.min.js', async: true }  // MathJax
  math: {
		mathjax: '',
		config: 'TeX-AMS_HTML-full'  // See

// Probably should link these to smaller test images / faster site! 
var kImg = document.getElementById("test-img");
kImg.onclick = function() {
  var newNum = Number(kImg.getAttribute("num")) + 1;
  kImg.setAttribute("num", newNum);
  // kImg.setAttribute("data-src", kodakImg(newNum));
  kImg.src = kodakImg(newNum);

// Randomize inital image on document load -- too late?
// Reveal.addEventListener( 'ready', function( event ) {
//   kImg.src = kodakImg(Math.round(Math.random()*24));
// } );

function kodakImg(n) {
  // Images are numbered 01, 02, ..., 24
  var num = n < 1 ? n + 23 : n-1;
  num = (num % 24) + 1;
  num = ((num < 10) ? "0" : "") + String(num); // Pad to two digits with a zero
  return ""+num+".png"