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

              
                <html>

	<head>
	
		<title>Product Landing Page</title>
	
	</head>
	
	<body>
	
		<header id="header">
			<div class="logo">
				<img id="header-img" src="https://www.dropbox.com/s/hzeqqpgan8onpnr/logo1.png?dl=0" alt="Drum Logo">
			</div>
			
			<nav id="nav-bar">
				<ul>
					<li><a class="nav-link" href="#interesting-facts">Interesting Facts</a></li>
					<li><a class="nav-link" href="#how-it-works">How it Works</a></li>
					<li><a class="nav-link" href="#contact">Contact</a></li>
				</ul>
			</nav>
		</header>
		
		<section id="interesting-facts">
			<div class="grid">
				<div class="desc">
					<h2>
						Drums Make You Live Longer!
					</h2>
					<p>
						The first of the drum facts on this list is the statement of 107-year old Viola Smith- who claims that her love and practise of drumming has seen her live a long and healthy life. 
						One of the world’s first professional female drummers, as of November 2019 she was still drumming professionally in the Forever Young Band: America’s Oldest Act of Professional Entertainers!
					</p>
				</div>
			</div>
			
			<div class="grid">
				<div class="desc">
					<h2>
						Talking Drums
					</h2>
					<p>
						African tribal drummers were so skilled at drumming that they could accurately mimic the patterns of speech through performing rhythms. 
						This was used to send messages long distances to other tribesmen who would otherwise be out of earshot. This skill was used by tribespeople as far apart as Ghana and Southern Africa!
					</p>
				</div>
			</div>
			
			<div class="grid">
				<div class="desc">
					<h2>
						Don’t Let Anything Hold You Back
					</h2>
					<p>
						You can play difficult drum parts with only one arm! Rick Allen of Def Leppard fame joined up with the band when he was just fourteen – his mum wrote in reply to the ad looking for a drummer on his behalf! – 
						but lost his arm while they were still on their way to legendary status. After recovering, he rearranged his gear to use extra foot pedals to replace the drum set components he used to operate with his left arm.
					</p>
				</div>
			</div>
			
			<div class="grid">
				<div class="desc">
					<h2>
						The Oldest Instrument
					</h2>
					<p>
						Drums have not changed much over the millennia. The form of a drum has stayed virtually the same: 
						a skin or membrane stretched tightly over a hollow contained space that provides the reverberation needed to make the sound. 
					</p>
				</div>
			</div>
			
			<div class="grid">
				<div class="desc">
					<h2>
						Drummers from All Over
					</h2>
					<p>
						Another record was broken in 2019 when the Australian city of Stirling was determined to strike a blow for harmony and diversity. 
						They succeeded in bringing together over 100 drummers of 77 different nationalities to play together for long enough to satisfy the Guinness Records judge. They succeeded and hold the title of ‘most nationalities in a drum circle‘.
					</p>
				</div>
			</div>
		</section>
		
		<section id="how-it-works">
			<iframe 
      id="video"
			width="560" 
			height="315" 
			src="https://www.youtube-nocookie.com/embed/YEq7GZFyh6M" 
			title="YouTube video player" 
			frameborder="0" 
			allowfullscreen>
			</iframe>
		</section>
		
		<section id="hero">
			<h2>Stage Star, Fine Tunes</h2>
			<form id="form" action="https://www.freecodecamp.com/email-submit">
				<input id="email" name="email" type="email" placeholder="Enter Your Email Here" required>
				<input id="submit" type="submit" value="Get Started" class="btn">
			</form>
		</section>
		
		<footer id="contact">
			<ul>
				<li><a href="#">Facebook</a></li>
				<li><a href="#">Twitter</a></li>
				<li><a href="#">Instagram</a></li>
			</ul>
		</footer>
	
	</body>

</html>
              
            
!

CSS

              
                body {
	background-color: #eee;
	font-family: 'Lato', sans-serif;
	margin: 0;
	padding: 0;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  display: flex;
  justify-content: space-round;
  align-items: center;
  color: white;
  font-family: 'Exo 2', sans-serif;
}

nav {
	width: 100%;
	background: white;
	overflow: auto;
}

nav a {
	width: 100%;
	display: block;
	padding: 20px 15px;
	text-decoration: none;
	text-align: center;
}

nav a:hover {
	background: #eee;
	transition: 0.5s;
	text-transform: uppercase;
}

a {
	text-decoration: none:
}

ul {
	padding: 0;
	margin: 0 0 0 150px;
	list-style: none;
}

li {
	float: left;
	padding-right: 150px;
	margin-left: 20px;
}

.logo {
	position: absolute;
	margin-top: 15px;
	margin-left: 10px;
	width: 150px;
}

#header-image {
    position: relative;
    display: inline;
    height: 2rem;
	width: 150px;
	max-width: 300px;
	margin-left: 50px;
}

@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }
}

.grid {
	display: flex;
}

#interesting-facts {
	margin-top: 50px;
}

#interesting-facts .desc {
	display: flex-wrap;
	flex-direction: column;
	justify-content: center;
	height: 120px;
	width: 80vw;
	padding: 2px;
	margin-left: 30px;
}

#how-it-works {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

#how-it-works > iframe {
  max-width: 560px;
  width: 100%;
}

#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 200px;
  margin-top: 50px;
}

#hero > h2 {
  margin-bottom: 20px;
  word-wrap: break-word;
}

#hero input[type='email'] {
  max-width: 275px;
  width: 100%;
  padding: 5px;
}

#hero input[type='submit'] {
  max-width: 150px;
  width: 100%;
  height: 30px;
  margin: 15px 0;
  border: 0;
  background-color: #f1c40f;
}

#hero input[type='submit']:hover {
  background-color: orange;
  transition: background-color 1s;
}

@media (max-width: 650px) {
  #hero {
    margin-top: 120px;
  }
}

footer {
	margin-top: 30px;
	background-color: #ddd;
	padding: 20px;
}

footer > ul {
  display: flex;
  justify-content: flex-end;
}

footer > ul > li {
  padding: 0 10px;
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console