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.


  <!-- this the top part of the form that contains the title and other things -->
    <h1 id="title">Thank You</h1>
    <p id="description">we would like to listen to your opinions about our product and help us improve our services</p>
  <!-- this is the form element that contains all the form inputs and elements -->
  <form id="survey-form">
    <!-- the first name input  -->
    <div class="firstName form-field left">
      <label for="name" id="name-label">First Name</label>
      <input type="text" name="firstName" id="name" placeholder="ex: Charaf" required />
    <!-- the last name input  -->
    <div class="lastName form-field right">
      <label for="lname">Last Name</label>
      <input type="text" name="lastName" id="lname" placeholder="ex: Marghin" required />
    <!-- the email input  -->
    <div class="email form-field stretch">
      <label for="email" id="email-label">Email</label>
      <input type="email" name="email" id="email" placeholder="ex:" required />
    <!-- the age input  -->
    <div class="age form-field left">
      <label for="number" id="number-label">Age</label>
      <input type="number" name="age" id="number" placeholder="ex: 19" required max="60" min="18" />
    <!-- address input (it's optional)  -->
    <div class="address form-field right">
      <label for="address">Address</label>
      <input type="text" name="address" placeholder="ex: 17 Tahmidant Errich Morocco (optional)" id="address" />
    <!-- dropdown to choose the study level of the user  -->
    <div class="study form-field left">
      <select class="dropdown" name="studyLvl" id="dropdown" required>
        <option value="title" selected disabled>Study Level</option>
        <option value="primary">Primary</option>
        <option value="college">College</option>
        <option value="university">University</option>
        <option value="none">None</option>
    <!-- another dropdown to choose the hobbie of the user  -->
    <div class="hobbies form-field right">
      <select class="dropdown" name="hobbies" required>
        <option value="title" selected disabled>Hobbies</option>
        <option value="coding">Coding</option>
        <option value="design">Design</option>
        <option value="reading">Reading</option>
        <option value="writing">Writing</option>
        <option value="other">Other</option>
    <!-- a collection of radio buttons to choose the state of the user  -->
    <div class="socal-state form-field left">
      <p class="label">Are You :</p>
      <label for="single">
        <input type="radio" value="single" name="state" id="single" checked />
      <label for="married">
        <input type="radio" value="married" name="state" id="married" />
      <label for="none">
        <input type="radio" value="none" name="state" id="none" />
        I don't want to talk about it
    <!-- a collection of checkboxes to choose the elements that user likes to do  -->
    <div class="likes form-field right">
      <p class="label">I like :</p>
      <label for="coding">
        <input type="checkbox" value="coding" name="coding" id="coding" checked />
      <label for="eat">
        <input type="checkbox" value="eating" name="eating" id="eat" />
      <label for="travel">
        <input type="checkbox" value="traveling" name="tarveling" id="travel" />
    <!-- the messege field where the user writes his message about us or anything bla bla bla  -->
    <div class="message form-field stretch">
      <p class="label">Write your opinion about our product</p>
      <textarea name="message" id="message" rows="10" required placeholder="Take your time and tell us what we should do to improve our services ..."></textarea>

    <!-- the submit button  -->
    <input type="submit" class="right form-field" id="submit" value="Send" />


                /* variables  */
:root {
  --main-font: "Noto Sans JP", sans-serif;
  --body-clr: #fafafa;
  --secondary-clr: rgba(220, 0, 154, 0.5);
/* ======== resets =========  */
*::before {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
html {
  font-size: 100%;
  font-family: var(--main-font);
  font-weight: 300;
  box-sizing: border-box;
body {
  background: var(--body-clr);
  overflow-x: hidden;
h3 {
  text-transform: uppercase;
  text-align: center;
/* =========================== */
/* this is a quick css styling you can change it and do whatever best practice you want or anything  */
main {
  padding: 1rem;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
/* to create the big pink circle  */
main::before {
  content: "";
  position: absolute;
  width: 40vw;
  min-width: 350px;
  min-height: 350px;
  max-width: 650px;
  max-height: 650px;
  height: 40vw;
  border-radius: 50%;
  background: var(--secondary-clr);
  top: -5%;
  right: -5%;
  z-index: -10;
/* header section  */
header {
  padding: 2rem 0;
  text-align: center;
header p {
  color: rgba(0, 0, 0, 0.4);
/* the form with a grid systeme layout  */
form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  color: rgba(0, 0, 0, 0.7);
/* in mobile first I wanted to give all the fields all the available width  */
.form-field {
  grid-column: 1 / 13;
/* all inputes without checkboxes and radios */
input:not([type="checkbox"], [type="radio"]),
select {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  font-family: var(--main-font);
  background: rgba(255, 255, 255, 0.2);
option {
  background: #fff;
label {
  display: block;
  margin-bottom: 0.6rem;
label:not(label + input[type="checkbox"]) {
  font-weight: 500;
.label {
  font-weight: 600;
  margin-bottom: 1rem;
textarea {
  resize: unset;
input[type="submit"] {
  background: var(--secondary-clr);
  cursor: pointer;
  border: none;
  transition: .1s ease;
input[type="submit"]:hover {
  background: rgba(220, 0, 154, 0.8);
@media only screen and (min-width: 750px) {
  .left {
    grid-column: 1 / 6;
  .right {
    grid-column: 8 / 13 !important;