Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

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.

HTML

              
                <html>
<head>
    <!-- Material Design Lite CSS -->
    <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-pink.min.css">
    <!-- Font Awesome CSS -->
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- Material Design icon font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>

<style>
    .util-center {
        margin: auto;
    }

    .util-max-512px {
        max-width: 512px;
    }

    .util-spacing-h--40px {
        margin-top: 40px;
        margin-bottom: 40px
    }
    .util-no-decoration {
        text-decoration: none;
    }
</style>

<body class="mdl-color--blue-grey-50">
 
 
<!-- LOGIN FORM -->
<div class="mdl-grid">

    <div class="mdl-card mdl-shadow--16dp util-center util-spacing-h--40px">
        <div class="mdl-card__title mdl-color--orange-800">
            <h2 class="mdl-card__title-text mdl-color-text--white">User Login</h2>
        </div>
        <div class="mdl-card__supporting-text mdl-grid">
          
            <b class="mdl-color-text--accent">Error message goes here</b>
          

            <form method="POST" action="">
                <input type="hidden" name="action" value="login"/>



                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell mdl-cell--12-col">
                    <label class="mdl-textfield__label mdl-color-text--grey" for="textfield_username">Username</label>
                    <input class="mdl-textfield__input" type="text" id="textfield_username" name="username"/>
                </div>

                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell mdl-cell--12-col">
                    <label class="mdl-textfield__label mdl-color-text--grey" for="textfield_password">Password</label>
                    <input class="mdl-textfield__input" type="password" id="textfield_password" name="password"/>

                </div>

                <div class="mdl-cell mdl-cell--12-col send-button" align="center">

                    <button type="submit"  class="mdl-button mdl-js-ripple-effect mdl-js-button mdl-button--raised mdl-button--colored mdl-color--primary">
                        Log In
                    </button>
                </div>

            </form>

        </div>
    </div>
</div>

<!-- REGISTER FORM -->
<div class="mdl-grid" >
    <div class="mdl-card mdl-shadow--16dp util-center util-spacing-h--40px">
        <div class="mdl-card__title mdl-color--teal-500">
            <h2 class="mdl-card__title-text mdl-color-text--white">Create a New Account</h2>
        </div>
        <div class="mdl-card__supporting-text mdl-grid">

            <b class="mdl-color-text--accent">Error message goes here</b>
           

            <form method="POST" action="">
                <input type="hidden" name="action" value="register"/>

                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell mdl-cell--12-col">
                    <label class="mdl-textfield__label mdl-color-text--grey" for="textfield_new_username">Username</label>
                    <input class="mdl-textfield__input" type="text" id="textfield_new_username" name="username" pattern="^[a-z0-9_-]{3,15}$"/>
                    <span class="mdl-textfield__error">3-15 characters with only lowercase letters, digits, underscore, and hyphen</span>
                </div>

                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell mdl-cell--12-col">
                    <label class="mdl-textfield__label mdl-color-text--grey" for="textfield_new_password">Password</label>
                    <input class="mdl-textfield__input" type="password" id="textfield_new_password" name="password"
                            pattern="((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})"/>
                    <span class="mdl-textfield__error">
                        6-20 characters with at least a digit, lowercase and uppercase letters,
                        and special symbol in @#$%
                    </span>
                </div>

                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell mdl-cell--12-col">
                    <label class="mdl-textfield__label mdl-color-text--grey" for="textfield_password_confirm">Password Confirm</label>
                    <input class="mdl-textfield__input" type="password" id="textfield_password_confirm" name="password_confirm"/>
                </div>

                <div class="mdl-cell mdl-cell--12-col send-button" align="center">
                    <button class="mdl-button mdl-js-ripple-effect mdl-js-button mdl-button--raised mdl-button--colored" id="login">
                        Register
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Material Design Lite JavaScript -->
<script src="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.min.js"></script>

</body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console