Pen Settings



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


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.


                <div class="wrap">

  <div class="container">

    <form id="formBasic" action="#">

      <div class="row">
        <h1>Form Basic</h1>

      <!-- Input Base -->
      <div class="row">
        <div class="column column-50">
          <label for="input-base">Input Base</label><input type="text" id="input-base" value="input value">

        <!-- Select Base -->
        <div class="column column-50">
          <label for="select-base">Select Base</label>
          <!-- <select name="select-base" id="select-base"> -->
          <select name="select-base" id="select-base"> // option size="n" / multiple
            <option value="option1">option1</option>
            <option value="option2">option2</option>
            <option value="option3">option3</option>
            <option value="option4">option4</option>
            <option value="option5">option5</option>

      <!-- CheckBox -->
      <div class="column column-50">
        <fieldset id="check-base">
          <label><input type="checkbox" name="checkBase" value="ItemA">ItemA</label>
          <label><input type="checkbox" name="checkBase" value="ItemB" checked>ItemB</label>
          <label><input type="checkbox" name="checkBase" value="ItemC">ItemC</label>

      <!-- Submit -->
      <div class="row">
        <div class="column column-20">
          <button class="button button-outline" type="button" onclick="show()">Submit</button>
        <div class="column column-80 result">
          <div class="flex">
            <div class="res view"></div>
            <div class="res choose"></div>



                // Reset
* {
  font-weight: 400;
  color: dimgray;
  letter-spacing: 1px;
// Utility
.flex {
  display: flex;

// Develop
.wrap {
  margin: 4vh auto;
  max-width: 80vw;
.column {
  margin: 16px 0;

.result {
  font-size: 24px;
  .res {
    color: tomato;



                const x = document.getElementById("input-base");
const s = document.getElementById("select-base");
const c = document.getElementById("check-base");
const v = document.querySelector(".view");

/* ===== View Result Value ===== */
const show = () => {
  // === CheckBox ===
  const arr = [];
  const elems = document.getElementsByName("checkBase");
  // チェックボックスを全部見に行く
  for (let i = 0; i < elems.length; i++) {
    // console.log(elems[i].checked); / console.log(elems[i].value);
    // チェックの入っているフォームの値だけ配列で取り出す
    if (elems[i].checked) {
      elems[i].checked === true;
  /* === Input / Selectの値はそのまま取得表示 === */
  if (x.value !== "") {
    v.innerHTML = x.value + ", " + s.value + ", " + arr;
  } else {