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

              
                <header id="header">
    <div class="logo">
     <img src="https://img.icons8.com/ios/100/000000/guitar.png" id="header-img" alt="guitar store logo">
      <p>GS</p>
      </div>
    <nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#about">About us</a></li>
         <li><a class="nav-link" href="#demo">Demo</a></li>
         <li><a class="nav-link" href="#pricing">Pricing</a></li>
      </ul>
    </nav>
  </header>

  <div class="title">
  <h1>Guitar Store</h1>
    <p>Best instruments for beginers and professionals</p>
  </div>
  
  <section id="about">
    <h2>Why Guitar Store</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in lectus enim. Nam convallis id metus et vehicula. Aliquam hendrerit quam odio, eu gravida justo ultricies ac. Aliquam sed lectus risus. Nullam vel ultricies purus. Vestibulum ullamcorper, dolor sit amet venenatis ultrices, orci elit semper ex, nec faucibus quam erat quis augue. Maecenas aliquet interdum velit, vitae lacinia metus sagittis a.</p>
  </section>

  <section id="demo">
    <h2>Hear the difference</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in lectus enim. Nam convallis id metus et vehicula. Aliquam hendrerit quam odio, eu gravida justo ultricies ac. Aliquam sed lectus risus. Nullam vel ultricies purus. Vestibulum ullamcorper, dolor sit amet venenatis ultrices, orci elit semper ex, nec faucibus quam erat quis augue. Maecenas aliquet interdum velit, vitae lacinia metus sagittis a.</p>
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/hXQxSi34GWY" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </section>
  
  <section id="pricing">
    <h2>Pricing</h2>
    <div class="wrapper">
      <div class="item">
        <h3>Basic model</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in lectus enim. Nam convallis id metus et vehicula. Aliquam hendrerit quam odio, eu gravida justo ultricies ac.</p>
        <p class="price">200$</p>
      </div>
       <div class="item">
        <h3>Medium model</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in lectus enim. Nam convallis id metus et vehicula. Aliquam hendrerit quam odio, eu gravida justo ultricies ac.</p>
        <p class="price">700$</p>
      </div>
       <div class="item">
        <h3>Pro model</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in lectus enim. Nam convallis id metus et vehicula. Aliquam hendrerit quam odio, eu gravida justo ultricies ac.</p>
        <p class="price">2000$</p>
      </div>
    </div>
    </section>
 
    <div id="email-action">
      <h3>Send your email for more information</h3>
  <form id="form" action="https://www.freecodecamp.com/email-submit">
     <input name="email" id="email" type="email" placeholder="Email address" required/>
     <input id="submit" type="submit" value="Submit"/>
  </form>
     </div>
  
  <footer>
     <p>All rights reserved, 2021 | Development: KL</p>
   
      <ul>
        <li><a class="footer-link" href="#">Privacy</a></li>
         <li><a class="footer-link" href="#">Terms</a></li>
         <li><a class="footer-link" href="#">Contact</a></li>
      </ul>
    
  </footer>


  
  
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap');

:root{
  --main-font: sans-serif;
  --logo-font: 'Dancing Script', cursive;
  --basic-font-size: calc(12px + 0.4vw);
   --dark-sea-green: #1a1a1a;
  --light-sea-green: #53c68c;
}


*{
  margin: 0;
  padding: 0;
  font-family: var(--main-font);
  
  box-sizing: border-box;
 }

/*
 navigation bar
 */

#header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  position: sticky;
  top: 0;
  
}

.logo{
  display: flex;
  align-items: center;
  
}

#header-img{
  transform: rotate(-135deg);
  margin-left: 20px;
  margin-right: 10px;
  height: 70px;
}


.logo p{
  font-family: var( --logo-font);
  font-size: 40px;
}


li{
  display: inline-block; 
}

li a{
  text-decoration: none;
  color: black;
  margin-right: 1.5em;
  font-size: var(--basic-font-size);
  line-height: 2em;
}

@media(max-width: 700px){
  #header-img{
  height: 60px;
  }
  
  .logo p{
  font-size: 30px;
}
  
  li a{
  font-size: 17px;
} 
}

@media (max-width: 500px){
   #header{
    flex-direction: column;
  }
  li a{
    margin-bottom: 1em;
  }
}

.nav-link:hover{
  text-shadow: 0 7px 7px var(--light-sea-green);
  }

/*
 header
 */

.title{
  margin: 0 auto;
  padding: 7vw 0 7vw 0;
  text-align: center;
  background-image: linear-gradient(45deg, rgba(32,96,64,0.4) 0%, rgba(45,134,89,0.4) 100%), url(https://images.pexels.com/photos/3051084/pexels-photo-3051084.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260);
  background-size: cover;
  background-position: center;
  color: white;
 
}


h1{
  font-size: calc(4.4 * var(--basic-font-size));
  line-height: 1.4em;  
}

h1+p {
  font-size: calc(1.7 * var(--basic-font-size));
  line-height: 1.4em;
}

/*
main content
 */

 section{
     display: flex;
     flex-direction: column;
     
     padding: 4vw 15vw 4vw 15vw;
 }

@media(max-width: 700px){
  section{
     padding: 4vw 7.5vw 4vw 7.5vw;
 }
}

#about, #pricing{
  background-color: var(--dark-sea-green);
  color: white;
}

h2{
  display: inline-block;
  align-self: flex-start;
  font-size: calc(1.9 * var(--basic-font-size));
  margin-bottom: 0.8em;
  line-height: 1.4em;
  
}

#about h2, #pricing h2{
  border-bottom: solid 4px var(--light-sea-green);
}

#demo h2{
  border-bottom: solid 4px var(--dark-sea-green);
}

section p{
  font-size: var(--basic-font-size);
  line-height: 1.5em;
}

@media(max-width: 700px){
  section p{
    font-size: 16px;
 }
}

#video{
  max-width: 560px;
  width: 100%;
  margin-top: 3em;
  border: none;
  align-self: center;
}

.wrapper{
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 3vw;
}

.item{
  width: 33,33%;
  
  padding: 2vw;
  
  background-color: #39ac73;
  text-align: center;
  
}

@media(max-width: 1100px){
  .wrapper{
    flex-direction: column;
    align-items: center;
  }
  
  .item{
    padding: 2em;
  }
}


h3{
  font-size: calc(1.5 * var(--basic-font-size));
  line-height: 1.5em;
  margin-bottom: 1em;
  border-bottom: 3px solid var(--dark-sea-green);
}

#pricing h2{
  align-self: center;
}


.price{
  font-weight: 600;
  font-size: calc(1.2 * var(--basic-font-size));
  margin-top: 1em;
  border-top: 3px solid var(--dark-sea-green);
  line-height: 1.8em;
  
}

#email-action{
  margin: 0 auto;
  padding: 2em;
  width: 50vw;
  position: relative;
  bottom: 2vw; 
  background-color: white;
}

@media(max-width: 700px){
  #email-action{
    width: 70vw;
  }
}

#email-action h3{
  border-bottom: none;
}

input[type='email']{
  width: 50%;
  font-size: var(--basic-font-size);
  line-height: 1.6em;
  padding-left: 0.3em;
  margin-right: 1em;
  border: 3px solid var(--dark-sea-green);
  color: #206040;
}



input[type='submit']{
  font-size: var(--basic-font-size);
  line-height: 1.6em;
  padding-left: 2em;
  padding-right: 2em;
  margin-right: 1em;
  border: 3px solid var(--dark-sea-green);
  background-color: var(--dark-sea-green);
  transition-property: background-color;
  transition-duration: 1s;
  color: white;
  cursor: pointer;
}

input[type='submit']:hover{
  background-color: var(--light-sea-green);
}


@media(max-width: 500px){
  input[type='email']{
    width: 100%;
    margin-bottom: 1em;
  }
}

/*
footer
*/

footer{
  display: flex;
  justify-content: space-evenly;
  font-size: var(--basic-font-size);
  line-height: 2em;
  padding: 0.5em;
  background-color: var(--light-sea-green);
  opacity: 0.6;
}

@media(max-width: 700px){
  footer{
    flex-direction: column;
    align-items: center;
  }
}

.footer-link:hover{
  color: white;
}



              
            
!

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