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="login">
    <form name='form-login'>


        <label for="name">Email</label>
        <input type="email" id="name" placeholder="Username" required>

        <label for="pw">Password</label>
        <input type="password"
               id= "pw"
               placeholder="Password" required>

        <ul class="helper-text">
            <li class="length">Must be at least 8 characters long.</li>
            <li class="lowercase">Must contain a lowercase letter.</li>
            <li class="uppercase">Must contain an uppercase letter.</li>
            <li class="special">Must contain a number or special character.</li>
        <input id="rgstr_btn" type="submit" value="Register" onclick="store()">


<div class="login">
    <form name='form-login'>

        <h1>SIGN IN</h1>

        <label for="userName">Email</label>
        <input type="email" id="userName" placeholder="Username" required>

        <label for="userPw">Password</label>
        <input type="password" id= "userPw" placeholder="Password" required>

        <div id="remember">
            <input type="checkbox" value="lsRememberMe" id="rememberMe"
                   style="display: inline-block;">
            <label>Remember me</label>

        <input id= "login_btn" type="submit" value="Login" onclick="check()">




                 @charset "utf-8";
        @import url(;

        [class*="fontawesome-"]:before {
          font-family: 'FontAwesome', sans-serif;

        body {
          background: white;
          color: white;
          font: 87.5%/1.5em 'Open Sans', sans-serif;
          margin: 0;

        p {
          line-height: 1.5em;

        after { clear: both; }

        .login {
          margin: 50px auto;
          width: 320px;

        .login form {
          margin: auto;
          padding: 22px 22px 22px 22px;
          width: 100%;
          border-radius: 5px;
          background: #282e33;
          border-top: 3px solid #434a52;
          border-bottom: 3px solid #434a52;

        .login form span {
          background-color: #363b41;
          border-radius: 3px 0px 0px 3px;
          border-right: 3px solid #434a52;
          color: #606468;
          display: block;
          float: left;
          line-height: 50px;
          text-align: center;
          width: 50px;
          height: 50px;

        .login form input[type="email"] {
          background-color: #3b4148;
          border-radius: 0px 3px 3px 0px;
          color: #a9a9a9;
          margin-bottom: 1em;
          padding: 0 16px;
          width: 90%;
          height: 50px;

        .login form input[type="password"] {
          background-color: #3b4148;
          border-radius: 0px 3px 3px 0px;
          color: #a9a9a9;
          margin-bottom: 1em;
          padding: 0 16px;
          width: 90%;
          height: 50px;

        .login form input[type="submit"] {
          background: #b5cd60;
          border: 0;
          width: 100%;
          height: 40px;
          border-radius: 3px;
          color: white;
          cursor: pointer;
          transition: background 0.3s ease-in-out;
        #login form input[type="submit"]:hover {
          background: #16aa56;


                function store(){

    var name = document.getElementById('name');
    var pw = document.getElementById('pw');
    var lowerCaseLetters = /[a-z]/g;
    var upperCaseLetters = /[A-Z]/g;
    var numbers = /[0-9]/g;

    if(name.value.length == 0){
        alert('Please fill in email');

    }else if(pw.value.length == 0){
        alert('Please fill in password');

    }else if(name.value.length == 0 && pw.value.length == 0){
        alert('Please fill in email and password');

    }else if(pw.value.length > 8){
        alert('Max of 8');

    }else if(!pw.value.match(numbers)){
        alert('please add 1 number');

    }else if(!pw.value.match(upperCaseLetters)){
        alert('please add 1 uppercase letter');

    }else if(!pw.value.match(lowerCaseLetters)){
        alert('please add 1 lovercase letter');

        localStorage.setItem('name', name.value);
        localStorage.setItem('pw', pw.value);
        alert('Your account has been created');

function check(){
    var storedName = localStorage.getItem('name');
    var storedPw = localStorage.getItem('pw');

    var userName = document.getElementById('userName');
    var userPw = document.getElementById('userPw');
    var userRemember = document.getElementById("rememberMe");

    if(userName.value == storedName && userPw.value == storedPw){
        alert('You are logged in.');
        alert('Error on login');