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

              
                <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<table class="contact">
  <tr>
    <th>お名前</th>
    <td><span class="wpcf7-form-control-wrap your-name"><input type="text" name="your-name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>電話番号</th>
    <td><span class="wpcf7-form-control-wrap your-tel"><input type="tel" name="your-tel" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-required wpcf7-validates-as-tel" aria-required="true" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>メールアドレス </th>
    <td><span class="wpcf7-form-control-wrap your-email"><input type="email" name="your-email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>ホームページ</th>
    <td><span class="wpcf7-form-control-wrap website"><input type="url" name="website" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-url wpcf7-validates-as-url" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>お問合せ番号</th>
    <td><span class="wpcf7-form-control-wrap your-number"><input type="number" name="your-number" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>生年月日</th>
    <td><span class="wpcf7-form-control-wrap birthday"><input type="date" name="birthday" value="" class="wpcf7-form-control wpcf7-date wpcf7-validates-as-date" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>ドロップダウン</th>
    <td><span class="wpcf7-form-control-wrap item-select"><select name="item-select" class="wpcf7-form-control wpcf7-select" aria-invalid="false"><option value="アイテム1">アイテム1</option><option value="アイテム2">アイテム2</option><option value="アイテム3">アイテム3</option></select></span></td>
  </tr>
  <tr>
    <th>チェックボックス</th>
    <td><span class="wpcf7-form-control-wrap item-checkbox"><span class="wpcf7-form-control wpcf7-checkbox"><span class="wpcf7-list-item first"><label><input type="checkbox" name="item-checkbox[]" value="アイテム1" /><span class="wpcf7-list-item-label">アイテム1</span></label></span><span class="wpcf7-list-item"><label><input type="checkbox" name="item-checkbox[]" value="アイテム2" /><span class="wpcf7-list-item-label">アイテム2</span></label></span><span class="wpcf7-list-item last"><label><input type="checkbox" name="item-checkbox[]" value="アイテム3" /><span class="wpcf7-list-item-label">アイテム3</span></label></span></span></span></td>
  </tr>
  <tr>
    <th>ラジオボタン</th>
    <td><span class="wpcf7-form-control-wrap item-radio"><span class="wpcf7-form-control wpcf7-radio"><span class="wpcf7-list-item first"><label><input type="radio" name="item-radio" value="アイテム1" checked="checked" /><span class="wpcf7-list-item-label">アイテム1</span></label></span><span class="wpcf7-list-item"><label><input type="radio" name="item-radio" value="アイテム2" /><span class="wpcf7-list-item-label">アイテム2</span></label></span><span class="wpcf7-list-item last"><label><input type="radio" name="item-radio" value="アイテム3" /><span class="wpcf7-list-item-label">アイテム3</span></label></span></span></span></td>
  </tr>
  <tr>
    <th>題名</th>
    <td><span class="wpcf7-form-control-wrap your-subject"><input type="text" name="your-subject" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></td>
  </tr>
  <tr>
    <th>メッセージ本文</th>
    <td><span class="wpcf7-form-control-wrap your-message"><textarea name="your-message" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false"></textarea></span></td>
  </tr>
</table>
 
<p><span class="wpcf7-form-control-wrap confirmation"><span class="wpcf7-form-control wpcf7-acceptance optional"><span class="wpcf7-list-item"><label><input type="checkbox" name="confirmation" value="1" aria-invalid="false" /><span class="wpcf7-list-item-label">承認確認する</span></label></span></span></span></p>
 
<p><input type="submit" value="送信" class="wpcf7-form-control wpcf7-submit" /></p>

              
            
!

CSS

              
                table.contact {
  border-collapse: collapse;
  margin-right: auto;
  margin-left: auto;
}
table.contact td,
table.contact th {
  border: 1px solid #ddd;
  padding: 10px;
}
table.contact th {
  background: #f9f9f9;
  font-weight: normal;
  padding-right: 1em;
  padding-left: 1em;
  line-height: 35px;
}
table.contact td input[type="text"],
table.contact td input[type="tel"],
table.contact td input[type="email"],
table.contact td input[type="url"],
table.contact td input[type="number"],
table.contact td input[type="date"],
table.contact textarea,
table.contact select{
  border: 1px solid #ddd;
  padding: 10px;
}
input[type="submit"]{
  display: block;
  margin: 2em auto;
  background: #666;
  border: none;
  color: #fff;
  cursor: pointer;
  height: 4em;
  line-height: 4em;
  padding: 0 4em;
}
textarea.wpcf7-form-control.wpcf7-textarea {
  width: 100%;
  box-sizing: border-box;
}
.wpcf7-form-control.wpcf7-acceptance{
  display: block;
  text-align: center;
}
.wpcf7-list-item label {
    cursor: pointer;
}
table.contact th.required::after{
  content: "必須";
  color: #f00;
  font-size: .7em;
  margin-left: 3px;
}
 
@media screen and (max-width: 600px) {
  table.contact td,
  table.contact th{
    border: none;
    display: block;
  }
  table.contact th{
    text-align: left;
    background: none;
    font-weight: bold;
    margin-top: .7em;
    margin-bottom: -10px;
  }
}
              
            
!

JS

              
                jQuery(function() {
    $('.wpcf7-validates-as-required').parents('td').prev('th').addClass('required');
});
              
            
!
999px

Console