Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <div id="links">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Righteous&display=swap" rel="stylesheet">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@700&family=Righteous&display=swap" rel="stylesheet">
</div>

<head > 
  <h1 id="title">What made you want to learn to code?</h1>
</head>
<body>
  <p id="description">As someone who is pursuing a degree in math and science, I was told that learning to code would look great on college applications and resumes, the only problem is that I have pretty much zero computer skills. I'm serious, I'm hopeless with pretty much any electronic device that you put in front of me. So, naturally, I was told that coding was way beyond my abilities. But I read a really interesting book where coding was used to do amazing things (can't remember the book title for the life of me), so I decided I would try it out (also I hate being told that I can't do something). So here I am, working towards a certificate in responsive web design, turns out I really like coding. And was wondering what brought other people to coding, so please answer a couple of questions and have a great day :)</p>
  <form id="survey-form">
      <p>Just the usual questions...</p>
      <div class="short-text">
        <label id="name-label" for="name">name
          <input 
                 type="text"
                 name="name"
                 id="name"
                 class="short-text"
                 placeholder="enter your name"
                 required/>
                 
          </label>
        <label id="email-label" for="email">email
          <input
                 type="email"
                 name="email"
                 id="email"
                 class="short-text"
                 placeholder="enter your email"
                 required/>
        </label>
        <label id="number-label" for="number">age
          <input
                 type="number"
                 min="4"
                 max="120"
                 name="number"
                 id="number"
                 class="short-text"
                 placeholder="age"/>
                 
        </label>
     
        <label for="gender">gender
          <select id="dropdown" name="gender" class="options">
            <option disabled selected value>select the best option</option>
            <option value="female">female</option> 
            <option value="male">male</option>
            <option value="nonbinary">nonbinary</option>
            <option value="preferN/und">prefer not to say / undefined</option>
          </select>
        </label>
    </div>
        <div id="radio" for="education">
          <p>What is your highest level of formal education?</p>
          <label>
            <input
                   type="radio"
                   value="high-school-or-below"
                   name="education"
                   class="options"/>
          high school or below</label>
          <label>
            <input
                   type="radio"
                   value="trade-school"
                   name="education"
                   class="options"/>
          trade school</label>
          <label>
            <input
                   type="radio"
                   value="undergraduate"
                   name="education"
                   class="options"/>
          undergraduate school</label>
          <label>
            <input
                   type="radio"
                   value="graduate-school"
                   name="education"
                   class="options"/>
          graduate school</label>
          <label>
            <input
                   type="radio"
                   value="none"
                   name="education"
                   class="options"/>
          no formal education</label>
          <label>
            <input
                   type="radio"
                   value="prefer-not"
                   name="education"
                   class="options"/>
          prefer not to say</label>
          <label>
            <input
                  type="radio" 
                  value="other"
                  name="education"
                  class="options"/>         
          other</label>
        </div>
        <div id="checkboxs">
          <p>What do you plan to use coding for?</p>
          <label>
            <input
                   type="checkbox"
                   value="personal"
                   class="options"/>
            personal projects like making a blog or a game</label>
          <label>
            <input
                   type="checkbox"
                   value="mandatory-work"
                   class="options"/>
          I need these skills to do my job</label>
          <label>
            <input
                   type="checkbox"
                   value="beneficial-work"
                   class="options"/>
          I think these skills will benefit my career</label>
          <label>
            <input
                   type="checkbox"
                   value="fun"
                   class="options"/>
          just for fun</label>
          <label>
            <input
                   type="checkbox"
                   value="unsure"
                   class="options"/>
          not really sure...</label>
          <label>
            <input
                   type="checkbox"
                   value="other"
                   class="options"/>
          some other reason</label>
        </div>
</div>
   <p>Use the space below to share your own introduction to coding and how far you have gotten so far.</p>
      <label id="short-answer" class="more-info">
        <textarea
               class="more-info"
               placeholder="type here"></textarea>
      </label>
      <button 
              type="submit"
              id="submit">submit</button>
  </form>
  
</body>

              
            
!

CSS

              
                #title {
  font-family: Righteous;
  font-size: 3.5em;
  color: #581845;
  opacity: 0.9;
  text-align: right;
  margin: 30px 30px 80px 30px;
}

body {
  background-image: url(https://ak.picdn.net/shutterstock/videos/17646406/thumb/1.jpg);
}

p {
  font-family: Inconsolata;
  font-size: 1.1em;
  background-color: rgba(213, 213, 213,0.95);
  padding: 10px 20px 10px 10px;
  margin: 30px 508px 30px 80px;
  border-color: rgb(217,160,146);
  border-width: 4px;
  border-style: solid;
}

.salmon-border {
  border-color: rgb(217,160,146);
  border-width: 10px; 
  border-style: solid;
}

#description{
  margin: 30px 30px 30px 80px;
}

.short-text {
  width: 60%;
  padding: 5px 5px 5px 80px;
  line-height: 28px;
  display: block; 
}

label {
  background: rgba(80,80,80,0.55);
  font-family: Inconsolata;
  padding: 3px 3px 3px 3px;
  display: block;
  margin: 0px 200px 0px 20px;
}


  


              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console