HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Survey Form - FreeCodeCamp</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel='stylesheet prefetch' href='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css> -->
<link href="css/style.css" rel="stylesheet" type="text/css">
<!-- <script type="text/javascript" src="js/script.js"></script> -->
</head>
<body>
<div class="text-box">
<h1 id="title">Survey Form - FreeCodeCamp</h1><hr>
<p id="description">Let us know about your experience with us and how we can improve our services</p>
</div>
<div id="form-outer">
<form id="survey-form" method="GET" action="">
<div class="rowTab">
<div class="labels">
<label id="name-label" for="name">* Full Name: </label>
</div>
<div class="rightTab">
<input type="text" name="name" id="name" class="input-field" placeholder="Enter your Full Name" required autofocus>
</div>
</div>
<div class="rowTab">
<div class="labels">
<label id="email-label" for="email">* Email: </label>
</div>
<div class="rightTab">
<input type="email" name="email" id="email" class="input-field" required placeholder="Enter your Email">
</div>
</div>
<div class="rowTab">
<div class="labels">
<label id="number-label" for="years">* How many years did you work with us? </label>
</div>
<div class="rightTab">
<input type="number" name="years" id="number" min="1" max="100" class="input-field" required placeholder="Enter number of years worked">
</div>
</div>
<div class="rowTab">
<div class="labels">
<label for="decisionToReturn">What factors would influence and enhance your decision to return to work with us?</label>
</div>
<div class="rightTab">
<select id="dropdown" name="decisionToReturn" class="dropdown">
<option disabled selected value>Select an option</option>
<option value="opportunities">Better work opportunities</option>
<option value="challenging">Challenging work</option>
<option value="training">Additional skills training program</option>
<option value="supervision">Engaged supervision</option>
<option value="treatment">Fair or equal treatment</option>
</select>
</div>
</div>
<div class="rowTab">
<div class="labels">
<label for="userRating">* How likely is that you would recommend our Company to a friend?</label>
</div>
<div class="rightTab">
<ul style="list-style: none;">
<li class="radio"><label>Definitely<input name="radio-buttons" value="1" type="radio" class="userRatings" ></label></li>
<li class="radio"><label>Maybe<input name="radio-buttons" value="2" type="radio" class="userRatings" ></label></li>
<li class="radio"><label>Not sure<input name="radio-buttons" value="3" type="radio" class="userRatings" ></label></li>
</ul>
</div>
</div>
<div class="rowTab">
<div class="labels">
<label for="most-like">What do you like most in our Company: </label>
</div>
<div class="rightTab">
<select id="most-like" name="mostLike" class="dropdown">
<option disabled selected value>Select an option</option>
<option value="team">The Team</option>
<option value="leadearship">The Leadearship</option>
<option value="projects">The Projects</option>
<option value="learn">The opprtunity to learn</option>
</select>
</div>
</div>
<div class="rowTab">
<div class="labels">
<label for="preferences">Things that should be improved in the future<br>(Check all that apply): </label>
</div>
<div class="rightTab">
<ul id="preferences" style="list-style: none;">
<li class="checkbox"><label><input name="prefer" value="1" type="checkbox" class="userRatings">The orientation received</label></li>
<li class="checkbox"><input name="prefer" value="2" type="checkbox" class="userRatings">The job duties</li>
<li class="checkbox"><label><input name="prefer" value="3" type="checkbox" class="userRatings">Clear and adequate directions</label></li>
<li class="checkbox"><label><input name="prefer" value="4" type="checkbox" class="userRatings">Performance expectations reasonable and clear</label></li>
<li class="checkbox"><label><input name="prefer" value="5" type="checkbox" class="userRatings">Conversations with the supervisors or managers</label></li>
<li class="checkbox"><label><input name="prefer" value="6" type="checkbox" class="userRatings">Open Meetings</label></li>
<li class="checkbox"><label><input name="prefer" value="7" type="checkbox" class="userRatings">Company Forum for Employees</label></li>
<li class="checkbox"><label><input name="prefer" value="8" type="checkbox" class="userRatings">Additional Courses</label></li>
</ul>
</div>
</div>
<div class="rowTab">
<div class="labels">
<label for="comments">Do you have any Comments or Suggestions?</label>
</div>
<div class="rightTab">
<textarea id="comments" class="input-field" style="height:75px;resize:vertical;" name="comment" placeholder="Enter your comment or suggestions here..."></textarea>
</div>
</div>
<button id="submit" type="submit">Submit</button>
</form>
</div>
<!--Footer-->
<footer id="footer" class="footer text-center">
<div class="contact">
<div class="row">
<a href="https://www.facebook.com/lindakovacsart" class="btn btn-default btn-social btn-facebook-f" target="_blank"><span class="fa fa-facebook-f"></span> Facebook</a>
<a href="https://twitter.com/lindakovacsart" class="btn btn-default btn-social btn-twitter" target="_blank"><span class="fa fa-twitter"></span> Twitter</a>
<a href="https://plus.google.com/u/1/112468176480762133222" class="btn btn-blue btn-social btn-google-plus" target="_blank"><span class="fa fa-google-plus"></span> Google+</a>
<a href="https://www.linkedin.com/in/lindakovacsart" class="btn btn-default btn-social btn-linkedin" target="_blank"><span class="fa fa-linkedin"></span> LinkedIn</a>
<a href="https://github.com/lindakovacs" class="btn btn-default btn-social btn-github" target="_blank"><span class="fa fa-github"></span> GitHub</a>
<a href="https://www.freecodecamp.org/lindakovacs" class="btn btn-default btn-social btn-freeCodeCamp" target="_blank"><i class="fa fa-free-code-camp"></i> FreeCodeCamp </a>
<a href="https://codepen.io/lindakovacs" class="btn btn-default btn-social btn-codepen" target="_blank"><i class="fa fa-codepen"></i>Codepen</a>
</div>
<p>© 2018 Made with ❤ by Linda Kovacs</a></p>
</footer>
</div>
<!--End Footer-->
<!-- <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/holder/2.8.1/holder.min.js'></script> -->
</body>
</html>
html,
body {
background-color: #3861EC;
color: #FFF;
text-align: center;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
min-width: 320px;
}
header {
font-size: 2em;
font-weight: bold;
margin: 20px;
}
.text-box {
background-color: #000;
border-radius: 20px;
margin: 2em auto;
padding: 20px;
width: 70%;
}
h1 {
margin: 0;
padding: 0;
font-size: 2.8em;
color: #fff;
text-align: center;
letter-spacing: 2px;
word-spacing: 5px;
line-height: 1em;
font-weight: bold;
}
#form-outer {
background-color: #FFF; /* rgb(250, 250, 250); */
color: #000;
margin: 0 auto;
border-radius: 4px;
width: 75%;
max-width: 900px;
padding: 10px;
padding-top: 20px;
}
.labels {
display: inline-block;
text-align: right;
width: 40%;
padding: 5px;
vertical-align: top;
margin-top: 10px;
}
.rightTab {
display: inline-block;
text-align: left;
width: 48%;
vertical-align: middle;
}
.input-field {
height: 20px;
width: 280px;
padding: 5px;
margin: 10px;
border: 1px solid #c0c0c0;
border-radius: 2px;
}
#years{
width: 40px;
}
.userRatings,
input[type="checkbox"] {
float: left;
margin-right: 5px;
}
#submit {
background-color: #3861EC;
border-radius: 4px;
color: white;
font-size: 1em;
height: 40px;
width: 96px;
margin: 10px;
border: 0px solid;
}
.dropdown {
height: 35px;
width: 250px;
padding: 5px;
margin: 10px;
margin-top: 15px;
border: 1px solid #c0c0c0;
border-radius: 2px;
}
.radio, .checkbox {
position: relative;
left: -43px;
margin-left: 10px;
display: block;
padding-bottom: 10px;
}
@media screen and (max-width: 833px) {
.input-field {
width: 80%;
}
select {
width: 90%;
}
}
@media screen and (max-width: 520px) {
.labels {
width: 100%;
text-align: left;
}
.rightTab {
width: 80%;
float: left;
}
.input-field {
width: 100%;
}
select {
width: 100%;
}
}
#footer {
background-color: #000;
border-radius: 20px;
margin: 2em auto;
padding: 20px;
width: 65%;
}
footer {
text-align: center;
font-size: 17px;
margin: 20px;
}
footer a {
color: #3861EC;
position: relative;
text-decoration: none;
font-weight: bold;
}
footer a:hover {
color: #FFF;
}
footer p {
margin: 0;
font-size: 17px;
}
//FCC testing
const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form');
Also see: Tab Triggers