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.


    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <form id="myForm" method="get">

        <input name="userid" pattern="^[0-9A-Za-z]+$" title="半角英数文字のみ有効" value="userid" required>
        <input type="search" name="q" list="keywords">
        <datalist id="keywords">
        <option value="プログラミング">
        <option value="ロボット">
        <option value="Webデザイン">
        <input type="email" name="emailN" autocomplete="email" placeholder="ex)" required>
        <input type="password" name="passN" required>
        <input type="url" name="urlN" required>
        <input type="number" name="numberN" min="5" max="10" required>
        <input type="color" name="colorN" required>
        <input type="time" name="timeN" required>
        <input type="date" name="dateN" required>
        <input type="range" name="rangeN" max="50" min="0" step="2">
      <label><input type="checkbox" name="chk1" value="tokyo">東京</label>
      <label><input type="checkbox" name="chk2" value="osaka">大阪</label>
      <label><input type="checkbox" name="chk3" value="fukuoka">福岡</label>
      <label><input type="radio" name="radioN" value="join" checked>参加</label>
      <label><input type="radio" name="radioN" value="abstention">不参加</label>
      <button id="button" type="submit">送信</button>
    <hr />
    <ul class="result">
    <table border="1">
      <tbody id="list">


                body {
  margin: 0;
  padding: 5px;
  font-size: 16px;

label {
  display: block;
  margin-bottom: 5px;
  margin-right: 5px;

input {
  font-size: 16px;

/* 正常の場合のスタイル */
input:valid {
  border: 2px solid #dddddd;
  background: #ffffff;

/* エラー場合のスタイル */
input:invalid {
  border: 2px solid #be2a2a;
  background: #ffcbdd;

button {
  font-size: 16px;


                var myForm = document.getElementById('myForm');
myForm.addEventListener('submit', function(event) {

  var list = document.getElementById('list');
  while (list.firstChild) list.removeChild(list.firstChild);

  var elements = document.getElementsByTagName("input");
  for(var i=0; i<elements.length; i++){
    var type = elements[i].type;
    var name = elements[i].name;
    var key = elements[i].id;
    var checked = elements[i].checked;
    var value = elements[i].value;
    if(type == "checkbox" || type == "radio"){
      if (checked) {
        view(name, type, value, list);
    }else {
      view(name, type, value, list);

}, false);

// 画面に表を作成する関数
var view = function(name, key, value, list) {
  var tr = document.createElement('tr');
  var td1 = document.createElement('td');
  var td2 = document.createElement('td');
  var td3 = document.createElement('td');
  td1.innerText = key;
  td2.innerText = name;
  td3.innerText = value;