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">
  <h1>CTA Example</h1>
  <p><strong>Text to attract customers or leads: </strong> like Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto incidunt ea facilis aspernatur ex laborum id at. Officia, in iste porro sed repudiandae incidunt dolorem velit repellat voluptatum quos ut.</p>
  <button class="btn btn-outline" id="cta">
    <img class="icon visible" src="">
    <img class="icon" src="">

    Penn State Hockey


                .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  h1 {
    flex: 0 1 100%;
    text-align: center;
    font-family: Ubuntu, Sans-serif;
    font-weight: 700;
    font-size: 44px;
  p {
    font-family: Ubuntu, Sans-serif;
    font-size: 16px;
    font-weight: 400;
    flex: 0 1 100%;
    padding: 0 25%;
    margin-bottom: 3em;
.btn {
  font-family: Ubuntu, Sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 4px;
  color: rgb(70, 130, 199);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 1px 2px 4px #00000099;
  margin-bottom: 4em;
  &-outline {
    border: 3px solid rgb(70, 130, 199);
    background: #fefefe;
    &:hover {
      background: #f5f5f5;
      filter: drop-shadow(1px 2px 4px black);

.icon {
  height: 18px;
  max-width: 15px;
  margin-right: 4px;
  &:not(.visible) {
    display: none;


                document.getElementById('cta').addEventListener('click', () => {
  document.getElementById('cta').querySelectorAll('img').forEach( el => {