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

+ 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.


                <div class="container main">
  <h1 class="title">GitHub Users</h1>
  <ul class="users"></ul>

<!-- A template won't show up on the page, but can be used in JavaScript -->
<template id="user-card-template">
  <li class="user-card">
    <img src="{{avatar_url}}" alt="Profile image for user {{login}}"/>
    <span class="user-name">{{login}}</span>

<template id="error-template">
  <div class="error">
    <h2 class="error-msg">Error</h2>


                body {
  background-color: #120F14;

.main {
  margin-top: 10px;
  border: 2px solid black;
  min-height: 100px;
  background-color: #C6C7B7;

.title {
  text-align: center;
  border-bottom: 1px dotted black;
  color: #1C1C17;

img {
  max-width: 50px;

ul {
  list-style: none;

li {
  margin: 3px 0;

.user-name {
  font-size: 1.2em;
  margin-left: 10px;
  color: #1C1C17;

.error {
  text-align: center;

.error-msg {
  color: red;


                var userCardTemplate = Handlebars.compile($("#user-card-template").html()); //Here we use jQuery to get the template's HTML which Handlebars turns into a function
var errorTemplate = Handlebars.compile($("#error-template").html());

var url = "";

$.getJSON(url, function(users) {
    console.log(users); // check your console to see what the data looks like!
    users.forEach(function(user) {
      $(".users").append(userCardTemplate(user)); //Call the function that Handlebars made from the template. Pass in the user object.
  }, function(error) {
    // This is the same as the error callback for jQuery.getJSON
    $(".title").after(errorTemplate({ text: error }));