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.


                <!-- Author:  Christian Pecson -->
<!-- Date: July 2, 2016 -->

<!-- Container (Projects) -->
<section class="w3-content w3-container w3-padding-64">
  <h1 class="w3-center">My Photo Gallery</h1>
  <p class="w3-center"><em>Click on the images to make them bigger</em></p>

  <!-- Responsive Grid. Four columns on tablets, laptops and desktops. Will stack on mobile devices/small screens (100% width) -->
  <div class="w3-row-padding w3-center" appml-data="images">
    <div class="w3-col m4 w3-padding-16" appml-repeat="image">
      <img src="{{src}}" alt="alt" style="width:100%" onclick="onClick(this)" class="w3-hover-opacity">
<!-- End Container (Projects) -->

<!-- Modal for full size images on click-->
<div id="modal" class="w3-modal w3-black" onclick="'none'">
  <span class="w3-closebtn w3-hover-red w3-text-white w3-xxxlarge w3-container w3-display-topright">×</span>
  <div class="w3-modal-content w3-animate-zoom w3-center w3-transparent w3-padding-64">
    <img id="img" style="max-width:100%">

<footer class="w3-container w3-dark-grey w3-hover-black w3-padding-8 w3-center">
  Made with <span id="heart">❤</span> by Christian Pecson


                #heart {
  color: #f77;

img:hover {
  cursor: pointer;


                // Images and alt attribute
var images = {
  image: [
    {src: '', alt: 'Project 1'}
    , {src: '', alt: 'Project 2'}
    , {src: '', alt: 'Project 3'}
    , {src: '', alt: 'Project 4'}
    , {src: '', alt: 'Project 5'}
    , {src: '', alt: 'Project 6'}
    , {src: '', alt: 'Project 7'}
    , {src: '', alt: 'Project 8'}
    , {src: '', alt: 'Project 9'}

// Show Modal Image 
function onClick(element) {
  document.getElementById("img").src = element.src;
  document.getElementById("modal").style.display = "block";