Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                .container
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=swap');

body {
  background: limegreen;
  color: white;
  font-size: 3.5em;
  font-family: 'Montserrat', sans-serif;
}

div {
  text-align: center;
  padding-bottom: 50px;
}

.container {
  animation: scoot 20s linear infinite;
}

@keyframes scoot {
  from {
    transform: translateY(30%);
  }

  to {
    transform: translateY(-100%);
  }
}
              
            
!

JS

              
                let posts = [
  "An Incredibly Serious Discussion about Next.js at Reactathon",
  "Enabling AMP in your Next.js projects",
  "Adding Babel presets and plugins in Next.js",
  "React Children: The misunderstood prop",
  "Query an API at both build time and runtime with Next.js",
  "How to turn off telemetry in Next.js",
  "Add Web Monetization to your sites with Snippet Injection",
  "Logging in Next.js",
  "Deploy from CodePen to Netlify in less than 30 seconds",
  "React Strict Mode in Next.js",
  "Environment variables in Next.js",
  "Global styles in Next.js",
  "Making a custom 404 page in Next.js",
  "Absolute Imports in Next.js",
  "Why you should code together: Mob Programming FAQs",
  "Building a custom React media query hook for more responsive apps",
  '"Escaping" Next.js to access the browser',
  "What is React Fast Refresh?",
  "Next.js: Should I use SSR or SSG?",
  "Using React Context for State Management",
  "A Spooky Adventure at Next.js Conf",
  "Preview Mode for Next.js now fully supported on Netlify",
  "Integrate Next.js and Prismic",
  "Integrate Next.js and Contentful",
  "Integrating Netlify Identity into your Next.js apps",
  "Next.js 101: What you should know",
  "2 Ways to Create Server-Rendered Routes Using Next.js and Netlify",
  "Add a Netlify-powered contact form to your Next.js site",
  "Handy new features in Next.js 9.4",
  "Improve your SEO and Social Sharing Cards with Next.js",
  "Building a Markdown blog with Next 9.4 and Netlify"
];

(() => {
  posts.map((p) => {
    document.querySelector('.container').innerHTML += `<div>${p}</div>`
  })
})()
              
            
!
999px

Console