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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div id="root"></div>
              
            
!

CSS

              
                body {
  padding: 40px;
  background: #f2f2f2;
}

ul {
  display: flex;
}

li {
  display: flex-item;
  min-width: 200px;
  margin: 20px;
  padding: 15px;
  
  list-style-type: none;
  text-align: center;
  
  background-color: #fefffa;
  box-shadow: 0px 0px 7px 0px rgba(0,0,0, 0.2);
  border-radius: 3px;
}

h2 {
  display: block;
  margin-bottom: 0;
  
  color: #811b54;
}

p {
  display: block;
}
              
            
!

JS

              
                function FrameworkItem(props) {
  return (
    <li>
      <h2>{props.framework.name}</h2>
      <p>{props.framework.description}</p>
    </li>
  );
}

class FrameworkContainer extends React.Component {
  constructor(props) {
    super(props);
  }
  
  render() {
    return (
      <ul>
        {
          this.props.frameworks.map(framework =>
            <FrameworkItem key={framework.id} framework={framework} />
          )
        }
      </ul>
    );
  }
}


const FRAMEWORKS_LIST = [{
  id: 1,
  name: 'React',
  description: 'A JavaScript library for building user interfaces.'
}, {
  id: 2,
  name: 'AngularJS',
  description: 'HTML enhanced for web apps!'
}, {
  id: 3,
  name: 'Vue.js',
  description: 'The Progressive JavaScript Framework.'
}, {
  id: 4,
  name: 'Aurelia',
  description: 'Aurelia is a JavaScript client framework for mobile, desktop and web leveraging simple conventions and empowering creativity.'
}];

ReactDOM.render(
  <FrameworkContainer frameworks={FRAMEWORKS_LIST} />,
  document.getElementById('root')
);
              
            
!
999px

Console