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

              
                <div class="container">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h1>Contact Form</h1>
      <form class="contact-form" autocomplete="off">
        <div class="row">
          <div class="col-md-6">
            <input type="text" id="name" name="Name" placeholder=" " required>
            <label for="name">Your name *</label>
          </div>
          <div class="col-md-6">
            <input type="email" id="email" name="E-mail" placeholder=" " required>
            <label for="email">Email *</label>
            <div class="requirements">Error text</div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <input type="text" id="message" name="Message" placeholder=" " required>
            <label for="message">Message *</label>
          </div>
        </div>
        <div class="row">
          <div class="col-md-6 captcha-wrap">
            <img src="http://denis-creative.com/wp-content/uploads/2017/06/captcha.jpg" alt="">
          </div>
          <div class="col-md-6">
            <button type="submit" class="btn">Send message</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $tit: 'Titillium Web', sans-serif
$lato: 'Lato', sans-serif
$yellow: #ffba00
$dark: #161613
$red: #d3362a
h1
  margin-bottom: 30px
  font-family: $tit
  font-weight: bold
  text-align: center
.contact-form
  input
    border: 0 none
    border-bottom: 1px solid #b9b9b8
    width: 100%
    font-family: $lato
    font-size: 16px
    line-height: 32px
    padding: 5px
    margin-bottom: 45px
    outline: none
    background: #fff
  .captcha-wrap
    margin-bottom: 45px
  .btn
    font-size: 24px
    line-height: 54px
    border: none
    width: 100%
    padding: 10px
    font-weight: 700
    text-align: center
    outline: none
    border-radius: 4px
    &:hover
      background-color: darken($yellow, 5)
  label
    color: #7f7f7e
    position: absolute
    top: 8px
    left: 20px
    transition: 0.28s
  input:focus + label
    top: -20px
    font-size: 12px
  input:invalid
    box-shadow: none
  input:valid
    border-bottom: 1px solid $dark
  input:valid + label
    top: -20px
    font-size: 12px
  input:invalid:not(:focus):not(:placeholder-shown)
    border-bottom: 1px solid $red
  input:invalid:not(:focus):not(:placeholder-shown) + label
    top: -20px
    font-size: 12px
  input:invalid:focus:not(:placeholder-shown) ~ .requirements
    max-height: 20px
  .requirements
    position: absolute
    bottom: 20px
    padding: 0 5px
    max-height: 0
    transition: 0.28s
    overflow: hidden
    font-size: 14px
    line-height: 20px
    color: $red
              
            
!

JS

              
                
              
            
!
999px

Console