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

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

              
                <p>Example of the Form Element Using novalidate attribute</p>

<form novalidate="">

<input type="email" name="email" placeholder="enter email">

<input type="url" name="url" placeholder="enter web address">

<input type="submit" name="submit" value="Submit">

</form>

<hr>

<p>Example of the Form Element without novalidate attribute</p>

<form>

<input type="email" name="email" placeholder="enter email">

<input type="url" name="url" placeholder="enter web address">

<input type="submit" name="submit" value="Submit">

          </form>

          <hr>
<p>Example of form with the action attribute</p>

<form action="contact.php">

<div>

<label>Name</label><br>

<input type="text" name="name">

              </div>

              <div>

<label>Email Address</label><br>

<input type="email" name="email">

              </div>

              <div>

<label>Subject</label><br>

<input type="text" name="subject" placeholder="Please, enter your subject">

              </div>

              <div>

<label>Message</label><br>

<textarea name="message" placeholder="Your message ..."></textarea>
             </div>
<br>
<button type="submit">Send</button>

            </form>

            <hr>

<p>Example of a php sript that will process the above form. This script should be saved with the file name: contact.php</p>

            <?php

              //if "email" variable is filled out, send email

                if (isset($_REQUEST['email']))  {

               

                //Email information

                $admin_email = "[email protected]";

                $email = $_REQUEST['email'];

                $subject = $_REQUEST['subject'];

                $message = $_REQUEST['message'];

               

                //send email

                mail($admin_email, "$subject", $message, "From:" . $email);

                

                //Email response

                echo "Thank you for contacting us!";

                }

               

              ?>
<p>Signup Form Example
<form action="" method="">

  <div>

    <label for="name">First Name:</label><br>

    <input type="text" name="name" id="name" required>

  </div>

  <div>

    <label for="lname">Last Name:</label><br>

    <input type="text" name="name" id="lname" required>

  </div>

  <div>

    <label for="email">Email Address:</label><br>

    <input type="email" name="email" id="email" required>

  </div>

  <div>

    <input type="submit" value="Sign Up!">

  </div>

</form>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console