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

              
                <! DOCTYPE html>
<head>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<style>
body {
   font-family: sans-serif;
  text-align: center;
  margin-left: 20%;
  margin-right: 20%;
}

h1{
  background-color: brown;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  padding: 10px;
  text-shadow: 2px 1px black;
    box-shadow: 2px 1px gray;
}
form {
    text-align: left;
}

header {
    margin-bottom: 30px;
}

div {

  margin-top: 10px;
    margin-bottom: 20px;
}

textarea {
  min-width: 350px;
  min-height: 100px;
}

@media screen and (max-width: 740px) {
h1 {
  font-size: 24px
}
body {
  margin-left: 10%;
  margin-right: 10%;
}

@media screen and (max-width: 250px) {
h1 {
  font-size: 18px
}
body {
  margin-left: 5%;
  margin-right: 5%;
  font-size: 12px;
}
}
</style>

  <header>
      <h1 id="title">We want to know your opinion. Tell us what you think about radicalism!</h1>
      <p id="description">Recently, there has been a rise in populism around the world. The most obvious example being the president of the United States. We would like to know your opinion, if you think, that populism and radicalism is on the rise in your country, how strong it is and what you think of it.</p>
  </header>
<form id="survey-form"  onsubmit="validateEmail()" action="">
  <div>
  <label id="name-label">Tell us your name</label>
  <input type="text" name="name" id="name" required placeholder="Enter your name"><br>
  <label id="email-label">Tell us your e-mail</label>
  <input type="email" name="email" id="email" required placeholder="Enter a valid email address"><br>
  <label id="number-label">Rate the situation 1-5 (voluntary)</label>
  <input type="number" name="number" id="number" min="1" max="5" placeholder="1-5"><br>
</div>

<div>
<p>Which do you think is the most common form of radicalism in your country?</p>
  <input list="roles" placeholder="Choose one">
  <datalist id="roles" id="dropdown">
<option value="Hate speech">
<option value="Street fights">
<option value="Political radicalism">
<option value="None of the above">
</datalist>
</div>

<div>
<p>Which do you think is the most common form of radicalism in your country? You can choose more in this option.</p>
  <input type="checkbox" value="Hate speech">Hate speech</input></br>
  <input type="checkbox" value="Street fights">Street fights</input></br>
  <input type="checkbox" value="Political radicalism">Political radicalism</input></br>
  <input type="checkbox" value="None of the above">None of the above</input></br>
</datalist><br>
</div>

<div>
<p name="howfound" class="radios">How did you find out about this survey?</p>
  <label for="searched"></label>
  <input name="radios" type="radio" value="searched">Searched for surveys</input><br>
  <label for="friend"></label>
  <input type="radio" name="radios" value="friend">From a friend</input><br>
  <label></label>
  <input type="radio" name="radios" value="none">None of the mentioned</input><br>

</div>

<div>
<p>Tell us more!</p>
  <textarea id="message" placeholder="Enter your comments here..."></textarea>
<br>
</div>

<button type="submit" id="submit">Submit</button>

</body>

              
            
!

CSS

              
                /*body {
   font-family: sans-serif;
  text-align: center;
  margin-left: 20%;
  margin-right: 20%;

}

h1{
  background-color: brown;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  padding: 10px;
  text-shadow: 2px 1px black;
  box-shadow: 2px 1px gray;
}
form {
    text-align: left;
}

header {
    margin-bottom: 30px;
}

div {
    margin-top: 10px;
    margin-bottom: 20px;
    border-right: 1px dashed gray;
    border-left: 1px dashed gray;
    padding-right: 10px;
    padding-left: 10px;
}

textarea {
  width: 350px;
  height: 100px;
}

@media screen and (max-width: 740px) {
h1 {
  font-size: 24px
}
body {
  margin-left: 10%;
  margin-right: 10%;
}
textarea {
  width: 150px;
  height: 100px;
}
}

@media screen and (max-width: 250px) {
h1 {
  font-size: 18px
}
body {
  margin-left: 5%;
  margin-right: 5%;
  font-size: 12px;
}
textarea {
  width: 150px;
  max-height: 100px;
}

}*/
              
            
!

JS

              
                
              
            
!
999px

Console