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

              
                <main>
  
  <h1>Your Account</h1>
  
  <form action="" method="post">
    
    <nav>
      <a href="#0" class="active">Sign In</a>
      <a href="#0">Create Account</a>
    </nav>
    
    <div class="form-field">
      <label for="email">Email Address</label>
      <input type="email" id="email" name="email">
    </div>
    
    <div class="form-field">
      <label for="password">Password</label>
      <input type="password" id="password" name="password">
    </div>
    
    <input type="submit" value="Sign In" class="button">
    
  </form>
  
  <a href="#0" class="forgot-password">Forgot your password?</a>
  
</main>




              
            
!

CSS

              
                :root {
  --brown: #AA8B59;
  --gray: rgb(14, 19, 25);
  --gray--t: rgba(14, 19, 25, 0);
  --body-font: 'Josefin Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--body-font);
  font-size: 90%;
  color: white;
  text-align: center;
  background: var(--gray) url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="49" viewBox="0 0 28 49"%3E%3Cg fill-rule="evenodd"%3E%3Cg id="hexagons" fill="%239C92AC" fill-opacity="0.1" fill-rule="nonzero"%3E%3Cpath d="M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

body {
  margin: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at bottom center,
    var(--gray--t), 
    var(--gray) 90%
  );
}

main {
  width: 600px;
  @media(max-width: 610px) {
    width: 320px;
    form { padding: 2rem; }
    nav { display: flex; justify-content: space-between; }
    nav a { margin: 0; }
  }
}

h1 {
  font-family: 'Crimson Text', serif;
  font-size: 3.4rem;
  letter-spacing: -0.06rem;
}

form {
  border: 7px double #AA8B59;
  padding: 3rem;
}

nav {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin: 0 0 2rem 0;
  a {
    display: inline-block;
    padding: 0.3rem 0;
    margin: 0 1rem;
    &.active {
      border-bottom: 2px solid var(--brown);
    }
  }
}
a {
  color: inherit;
  text-decoration: none;
}

.form-field {
  margin: 0 0 1rem 0;
  &:focus-within {
    label {
      color: white;
    }
  }
}
label {
  display: block;
  text-align: left;
  color: #7C7C7C;
}
input {
  width: 100%;
  background: none;
  color: white;
  border: 2px solid #7C7C7C;
  padding: 1.5rem;
  &:focus {
    border-color: white;
    outline: 0;
  }
}

.button {
  background: var(--brown);
  color: white;
  border: 0;
  font-family: var(--body-font);
  text-transform: uppercase;
  padding: 1.5rem;
  font-size: 1.0rem;
  letter-spacing: 0.1rem;
}

.forgot-password {
  display: block;
  margin: 2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  opacity: 0.9;
}
              
            
!

JS

              
                
              
            
!
999px

Console