Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <form>
<!-- START: Name -->
	<div class="form-group row p-2">
		<label class="col-sm-2 col-form-label">Name</label>
			<!-- First Name -->
      <div class="col-sm-5">
				<input type="text" class="form-control" placeholder="First name" aria-describedby="fnameHelpBlock">
				<small id="fnameHelpBlock" class="form-text text-muted">
					Required Field
				</small>
			</div>
			<!-- Last Name -->
			<div class="col-sm-5">
				<input type="text" class="form-control" placeholder="Last name" aria-describedby="lnameHelpBlock">
				<small id="lnameHelpBlock" class="form-text text-muted">
					Required Field
				</small>
			</div>
  </div>
<!-- END: Name -->
<!-- START: Phone Number -->
	<div class="form-group row p-2">
		<label class="col-sm-2 col-form-label text-right">Phone Number</label>
		<div class="col-sm-10">
			<div class="input-group">
				<div class="input-group-prepend">
					<div class="input-group-text">+1</div>
				</div>
				<div class="inputWithIcon col-sm-11">
					<input type="tel" class="form-control" placeholder="555-555-5555">
					<i class="fas fa-phone position-absolute"></i>
				</div>
			</div>
		</div>
	</div>
<!-- END: Phone Number -->
<!-- START: Email Address -->
	<div class="form-group row p-2">
		<label class="col-sm-2 col-form-label text-right">Email Address</label>
		<div class="col-sm-10">
			<div class="input-group">
				<div class="inputWithIcon w-100">
					<input type="email" class="form-control" placeholder="bob@microsoft.com" aria-describedby="emailHelpBlock">
					<i class="fas fa-envelope position-absolute"></i>
				</div>
				<small id="emailHelpBlock" class="form-text text-muted">
					Required Field
				</small>
			</div>
		</div>
	</div>
<!-- END: Email Address -->
<!-- START: Are you a platypus? -->
	<div class="form-group row p-2">
		<label class="col-sm-2 col-form-label text-right">Are you a platypus?</label>
		<div class="col-sm-10">
			<div class="input-group">
				<div class="col-sm-1">
					<label><input type="radio" aria-label="Yes"> Yes</label>
				</div>
				<div class="col-sm-1">
					<label><input type="radio" aria-label="No"> No</label>
				</div>
			</div>
		</div>
	</div>
<!-- END: Are you a platypus? -->
<!-- START: What is your favorite thing in life? -->
	<div class="form-group row p-2">
		<label class="col-sm-2 col-form-label text-right">What is your favorite thing in life?</label>
		<div class="col-sm-10">
			<div class="input-group">
				<textarea class="form-control" aria-label="What is your favorite thing in life?" placeholder="What is your favorite thing in life?"></textarea>
			</div>
		</div>
	</div>
<!-- END: What is your favorite thing in life? -->
<!-- START: Submit button -->
	<div class="form-group row p-2">
		<div class="col-sm-2">
			<!-- Left empty for spacing -->
		</div>
		<div class="col-sm-1">
			<button type="submit" class="btn btn-primary">Submit</button>
		</div>
	</div>
<!-- END: Submit button -->
</form>
              
            
!

CSS

              
                /* The custom style for the FA icons in the inputs */
.inputWithIcon {
  position: relative;
}
.inputWithIcon i {
  position: absolute;
  right: 0;
  top: 3px;
  padding: 9px 8px;
  color: #aaa;
  transition: 0.3s;
}
/* Since text-right and font-weight-bold don't seem to work on the labels ... */
.col-form-label {
	text-align: right;
	font-weight:bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console