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. 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


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.


  <h2>Кнопка внутри тегов &lt;from&gt;</h2>
<form id="form_1">
  <input name="input" type="text" placeholder="Введите что-нибудь" />
  <button type="submit">Отправить форму 1</button>

<h2>Кнопка вне тегов &lt;from&gt;</h2>
<form id="form_2">
  <input name="input" type="text" placeholder="Введите что-нибудь"/>

<button type="submit" form="form_2">Отправить форму 2</button>


                div {
  padding: 12px 0;
  border-bottom: 1px solid #efefef;

h2 {
  font-family: Tahoma;
  margin: 0;

form {

input, button {
  font-size: 16px;
  padding: 4px 8px;
  border: 1px solid #efefef
  border-radius: 3px;
  margin-top: 12px;

p {
  color: red;


  $('form').on('submit', function(e){
    var container = $(this).parent(),
        number = container.find('p').length;
    if(number < 3)
      text = 'Форма отправлена';
    if(number == 3)
      text = 'Не надоело еще кликать?';
    if(number == 4)
      text = 'Может хватит?'
    if(number == 5)
      text = 'Вы же уже поняли, что все работает';
    if(number == 6)
      text = 'Все, это был последний раз';
    if(number == 7)
      text = 'Я не шучу, хватит!'
    if(number == 8)
      text = 'Выкл.'
    if(number > 8)
      return false;
    container.find('h2').before('<p>' + text + '</p>');