css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>


Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

<div id="main">
<div id="heading">
<h1 id="title">Magic potion trial run</h1>
<div id="image-header">
<img src="https://bardandron.org/wp-content/uploads/2018/10/lab-512503_1920-altered2.jpg" alt="header image">
<div id="content">
<p id="description">Until just recently, magic potions were considered a stuff of fantasy. But for the past decade we, at the Association for the Development of Applied Alchemy, have been secretly working to make them a reality. Now we are proud to say that the process has entered its final stage, and we can offer enrolment in an innovative trial run of four revolutionary potions, developed in our laboratories. Every potion comes with an instruction manual and is effective after approx. 5 to 7 minutes after consumption.
  <p>Apply for the trial by filling out the order form below: </p>
<p><form id="survey-form">
  <label id="name-label">Your name (*required):</label>
  <input type="text" placeholder="Enter your name" id="name" required></input></p>
<p><label id="email-label">Your email (*required):</label>
<input type="email" placeholder="Enter your email" id="email" required>
<p><label id="number-label">Number of vials (each vial equals one portion; choose between 1 and 4): </label><br>
<input type="number" min="1" max="4" placeholder="Enter number" id="number"></input>
<p><label>Select a potion: </label>
<select id="dropdown">
  <option>-- Select an effect--</option>
  <option>Fall in love</option>
  <option>Heal a wound</option>
  <option>Forget a bad memory</option>
  <option>Persuade others</option>
<p><label>Concentration: </label><br>
<input type="radio" value="label" name="radio">20% (lasts fifteen minutes)</input><br>
<input type="radio" value="label" name="radio">40% (lasts half an hour)</input><br>
<input type="radio" value="label" name="radio">80% (lasts an hour)</input>
<p><label for="flavor">Flavors (you can mix more than one): </label><br>
<input type="checkbox" name="flavor" value="orange">Orange</checkbox><br>
<input type="checkbox" name="flavor" value="carrot">Carrot</checkbox><br>
<input type="checkbox" name="flavor" value="raspberry">Raspberry</checkbox><br>
<p><label for="address">Delivery address: </label>
<textarea name="address"></textarea></p>
<p><button id="submit">Submit</button></p>
<p class="credits">Coded and written by <a href="https://github.com/bardandron" target="_blank">Bard Andron, 2018</p>
<p class="credits"><a href="https://pixabay.com/en/lab-science-scientific-chemistry-512503/" target="_blank">Header image</a> by <a href="https://pixabay.com/pl/users/holdentrils-297699/" target="_blank">Holdrentrils</a>, CC0 license, modified</p>
              body {
  font-family: 'Gentium Book Basic', serif;
  background-color: #e6d6b5;

h1 {
  font-family: 'MedievalSharp', cursive;
  text-align: center;

a {
  text-decoration: none;
  color: #495679

a:hover {
  color: black;
  text-decoration: underline;

img {
  max-width: 100%;

input, select, button, textarea {
  border: none;
  padding: 5px;
  margin: 5px;
  border-radius: 5px;
  max-width: 100%;
  background-color: #f5f2ec;
  box-shadow: none;

input:hover, select:hover, button:hover, textarea:hover {
  background-color: #e2ded4;

input[type="number"] {
  min-width: 100px;

input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
input[type="number"] {
    -moz-appearance: textfield;

#main {
  width: 700px;
  margin: auto;

#content {
  font-size: 1.2em;

#description {
  text-align: justify;
  line-height: 1.4em

.credits {
  text-align: center;

@media (max-width: 750px) {
  #main {
    width: 90%;
    padding: 5%;
              // !! 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. 

  - Select the project you would 
    like to complete from the dropdown 
  - Click the "RUN TESTS" button to
    run the tests against the blank 
  - 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. 

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................