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

              
                <link href="https://fonts.googleapis.com/css2?family=Crete+Round&family=PT+Serif:wght@700&family=Prata&display=swap" rel="stylesheet">

<div id="header">
	<div id="header-img">

		<div id="nav-bar">
			<a class="nav-link" href="#Mechanics">Mechanics</a>
			<a class="nav-link" href="#On_track">On track</a>
			<a class="nav-link" href="#Museum_F1_Red_Bull">Museum F1 Red Bull</a>
		</div>
	</div>
</div>
<div class="content">

	<h1 id="Mechanics">Mechanics</h1>
	<img src="https://images.unsplash.com/photo-1552849397-7a2d7864a9b5?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzODg5OTU2Nw&ixlib=rb-1.2.1&q=85" alt="Mechanics of Red Bull">
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum voluptatem quas voluptatibus vel non dignissimos ipsum nesciunt recusandae distinctio cum vero sint nihil dolores, natus autem! Possimus quos dignissimos magnam fugiat esse sequi vitae veniam eos, aspernatur fugit? Aut porro ipsa recusandae totam possimus magnam hic architecto eaque iure. Iste.</p>
	<iframe width="560" height="315" src="https://www.youtube.com/embed/qTwb-K7sfNo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

	<h1 id="On_track">On track</h1>
	<img src="https://images.unsplash.com/photo-1503945839639-aea48daa250f?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzODg5OTcxOQ&ixlib=rb-1.2.1&q=85" alt="F1 on the track">
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum voluptatem quas voluptatibus vel non dignissimos ipsum nesciunt recusandae distinctio cum vero sint nihil dolores, natus autem! Possimus quos dignissimos magnam fugiat esse sequi vitae veniam eos, aspernatur fugit? Aut porro ipsa recusandae totam possimus magnam hic architecto eaque iure. Iste.</p>

	<iframe width="560" height="315" src="https://www.youtube.com/embed/KFoiIlDTwbg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

	<h1 id="Museum_F1_Red_Bull">Museum F1 Red Bull</h1>
	<img src="https://images.unsplash.com/photo-1631173384024-308b8d36333e?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzODg5OTc2MQ&ixlib=rb-1.2.1&q=85" alt="Museum of Red Bull F1">
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum voluptatem quas voluptatibus vel non dignissimos ipsum nesciunt recusandae distinctio cum vero sint nihil dolores, natus autem! Possimus quos dignissimos magnam fugiat esse sequi vitae veniam eos, aspernatur fugit? Aut porro ipsa recusandae totam possimus magnam hic architecto eaque iure. Iste.</p>

	<iframe width="560" height="315" src="https://www.youtube.com/embed/NUfOU7HvrTE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

</div>

<div id="form">
	<form action="https://www.freecodecamp.com/email-submit">
		<label for="email">Email</label>
		<input type="text" name="email" placeholder="name@.com" required>
		<br>
		<div id="submit">
			<button type="submit">Subscribe for more!</button>
		</div>
	</form>
		<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</div>
              
            
!

CSS

              
                
/* css*/
* {
	font-family: Merriweather, serif;
}
#header {
	padding: 0px 0px;
	margin: 0px 0px;
}
#header-img {
	justify-items: center;
	display: grid;
   	background-image: url("https://images.unsplash.com/photo-1571358657078-da729968f6b8?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzODk3OTE1Ng&ixlib=rb-1.2.1&q=85");
	height: 630px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	box-shadow: 1px 4px 15px 4px rgba(0, 0, 0, 0.62);
}

#nav-bar {
	display: flex;
	align-items: flex-end;
	flex-direction: inherit;
}
.nav-link {
	font-family: "Prata", serif;
	text-decoration: none;
	padding: 25px 20px 8px 28px;
	color: #eceff1;
	font-size: 2em;
	font-weight: bold;
}
.nav-link:hover {
	color: #ff5722;
	text-decoration: underline;
}
.content {
	display: inline-grid;
	place-items: center;
}
.content h1 {
	font-family: "Crete Round", serif;
	flex-direction: center;
	padding-top: 40px;
	font-size: 1.8em;
}
.content img {
	height: 600px;
	width: 1000px;
	box-shadow: 1px 4px 20px 1px rgba(0, 0, 0, 0.62);
	position: relative;
}
.content p {
	font-size: 1.5em;
	font-family: "Prata", serif;
	text-align: center;
	padding: 30px 80px;
}
.content iframe {
	align-content: center;
}
#form {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 40px;
	padding-bottom: 40px;
}
input {
	font-size: large;
	text-align: center;
	width: 150px;
	margin: 15px;
	border: 1.9px solid black;
}
label {
	font-size: 1.3em;
	color: black;
}
button {
	font-size: large;
	text-align: center;
	margin: 0px 0px 0px 67px;
	padding: 6px;
	border: 1.9px solid black;
}
iframe {
	position: relative;
}
@media (min-width: 480px) and (max-width: 853px) {
	#header-img {
		width: webkit-fill-available;
		height: 440px !important;
	}
	#nav-bar {
		display: grid;
		text-align: center;
		font-size: 11px;
	}
	.content {
		text-align: center;
		display: block !important;
	}
	.content img {
		width: -webkit-fill-available !important;
		height: -webkit-fill-available !important;
	}
	.video {
		grid-template-columns: 1fr;
		width: 100%;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console