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.


Auto Save

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.


                <script src=""></script>

  <header id="header">
    <h1 id="title">Coronavirus survey</h1>
  <div class="navbar">
    <div class="dropdown">
      <button class="dropbtn">Menu
      <div class="dropdown-content">
        <a href="#header">Top</a>
        <a href="#contact-info-header">Name and email</a>
        <a href="#email">People</a>
        <a href="#no-problem">Symptoms</a>
        <a href="#nonexistent">Additional comments</a>

    <p id="description">How has the coronavirus/COVID-19 affected you?</p>
    <form id="survey-form">

      <fieldset id="contact-info">
        <p><span id="contact-info-header">Contact Info</span><br>
          <label id="name-label">Name*</label><br>
          <input type="text" id="name" class="text" placeholder="  First name" required /><input type="text" id="last-name" class="text" placeholder="  Last name" required />
          <label id="email-label">email*</label><br>
          <input type="email" id="email" class="text" placeholder="" required />

      <p><label id="number-label">How many people do you personally know that have or had the
        <input type="number" min="0" max="1000" id="number" class="text" placeholder="  Number of people (from 0 - 1000)" required />

      <p>Where were they from?
        <select type="dropdown" id="dropdown">
          <option value="Select">Select an area</option>
          <option value="Select">North America</option>
          <option value="Select">South America</option>
          <option value="Select">Europe</option>
          <option value="Select">Asia</option>
          <option value="Select">Africa</option>

      <p>How serious do you think this problem is?
        <label><input type="radio" name="seriousness" value="Extreme" />Extreme</label>
        <label><input type="radio" name="seriousness" value="Major" />Major</label>
        <label><input type="radio" name="seriousness" value="Moderate" />Moderate</label>
        <label><input type="radio" name="seriousness" value="Minor" />Minor</label>
        <label><input type="radio" name="seriousness" id="no-problem" value="Not_a_problem" />Not a problem</label>

      <p>How bad were the symptoms?<br><u>Check all that apply</u>
        <label><input type="checkbox" value="Deadly" />Deadly</label>
        <label><input type="checkbox" value="Horribly_sick" />Horribly sick</label>
        <label><input type="checkbox" value="Sick" />Sick</label>
        <label><input type="checkbox" value="Minor_symptoms" />Minor symptoms</label>
        <label><input type="checkbox" value="Nonexistent" id="nonexistent" />Nonexistent</label>
      <p><label id="comments-label">Additional comments (optional)</label>
        <textarea class="text" id="comments" placeholder=" Any other thoughts?"></textarea>

      <p>* Required</p>

      <p><input type="submit" id="submit" /></p>

  <p id="empty"></p>

  <footer>Author: Doug Wallace, FCC/Github/CodePen: @broadsword-mo. Image: <i>"The Apothecary (The Chemist)"</i> circa
    1661. Oil painting by Gabriël Metsu (1629-1667).



                /* Font and container, sizing and scaling updated (U) 4/21/2020 */
html {
/*  font-size: 10px; */
  /*Below is roughly similar to the 10px base font size, but fluidly scalable*/
  font-size: calc(8px + 0.3vw); /* U */

body {
  font-size: 2rem;
  text-align: center;
  font-family: Calibri, sans-serif;
  line-height: 1.5;
  color: yellow;
  background-image: url(;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

h1 {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  line-height: 1;
  margin-bottom: 5rem;
  height: 2rem; /* U */
  text-shadow: 2px 3px 6px orange;

main {
  min-width: 225px;
  max-width: 50%;
  margin: auto;
  padding: 0 1.5rem;
  background-color: rgba(50, 50, 50, 0.8);
  border-style: ridge;
  border-width: 10px;
  border-radius: 7px;
  border-color: rgb(204, 191, 72);

form {
  text-align: left;

label {
  display: flex;
  align-items: center;

.navbar {
  height: 2em; /* U */
  border-radius: 3px;
  position: sticky;
  top: 0;
  margin-bottom: 1.5em;
  background-color: rgba(25, 25, 25, 0.9);
  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(204, 191, 72, 0.4);

.dropdown {
  float: left;

.dropdown .dropbtn {
  border: none;
  outline: none;
  font-size: 2rem;
  color: white;
  padding: 0.9rem 1.6rem; /* U */
  background-color: inherit;
  margin: 0;

/*Gray background color for menu button on hover*/
.dropdown:hover .dropbtn {
  background-color: rgba(100, 100, 100, 0.8);

/*Hide dropdown menu by default*/
.dropdown-content {
  display: none;
  position: absolute;
  border-radius: 3px;
  background-color: rgba(175, 175, 175, 0.8);
  min-width: 20rem; /*optional*/ /* U */
  box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.4);
  z-index: 1;

/*Styling for dropdown links*/
.dropdown-content a {
  float: none;
  color: black;
  padding: 1.2rem 1.6rem; /* U */
  text-decoration: none;
  display: block;
  text-align: left;

/* Add a dark gray background color to dropdown links on hover */
.dropdown-content a:hover {
  color: white;
  background-color: rgba(25, 25, 25, 0.8);

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;

#description {
  font-size: 2.5rem;

#contact-info-header {
  display: block;
  margin: -1rem 0 -2.5rem 0;
  text-align: center;
  font-size: 3rem;

#contact-info {
  background-color: rgba(137, 207, 235, 0.7);
  padding: 0 1.5rem;
  border-style: ridge;
  border-radius: 5px;
  border-color: rgb(204, 191, 72);

#email-label {
  margin-bottom: -3rem; /* U */

#comments-label {
  margin-bottom: 0.3rem; /* U */

#submit {
  font-family: Candara, sans-serif;
  font-size: 2rem;
  text-align: center;
  width: 100%;
  padding: 1rem 0px; /* U */
  margin: 2rem 0px 1rem 0px; /* U */

select {
  height: 3rem;
  width: 100%;
  border-radius: 5px;

#comments {
  resize: none;
  min-height: 10rem; /* U */
  padding-right: 0;

#empty {
  padding-bottom: 20rem; /* U */

footer {
  font-size: 1.5rem; /* U */
  color: black;
  padding: 1em;
  background-color: rgba(175, 175, 175, 0.8);
  border-radius: 3px;