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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fender Landing page</title>
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
    <header id="header">
        <div id="header-content">
            <img src="https://i.imgur.com/4PUxA1Y.png" alt="Fender logo" id="header-img">
        <nav id="nav-bar">
            <ul>
                <li><a class="nav-link" href="#description">Details</a></li>
                <li><a class="nav-link" href="#specs">Specifications</a></li>
                <li><a class="nav-link" href="#contacts">Contacts</a></li>
            </ul>
        </nav>
        </div>
        
    </header>

    <div class="wrapper">
        <main>
            
            <video id="video" controls>
                <source src="imgs/guitarVideo.mp4">
            </video>
            <div id="main-content">
                <h3 id="mainText">Great guitar, great price</h3>
                <p id="price">£300</p>
    
                <h4>Key features</h4>
                <p id="features">
                    -Single Coil Strat Pickups Create Strong, Clear Tones<br>
                    -Alder Body Provide a Warm, Sparkling High End<br>
                    -Maple Neck Creates Bright Characteristics<br>
                    -Vintage-Style Tremolo Bridge Offers Classic Pitch Bends<br>
                    -Die-Cast Tuners Provide Excellent Tuning Stability
                </p>
            </div>

            <div class="guitarPics">
                <img src="https://i.imgur.com/2q4JBqR.jpg" alt="Guitar front">
                <img src="https://i.imgur.com/v7L7JPf.jpg" alt="Guitar back">
            </div>   
            
            <div class="btn">
                <p>ORDER YOURS!</p>
            </div>
        </main>

        <div id="description">
            <hr>
            <h3 class="title">Full description</h3>

            <h5 class="subtitle">Excellent Tonewoods</h5>
            <p>The affinity series Stratocaster is crafted from a solid alder body with a maple neck and laurel fingerboard, delivering powerfully bright, clear tones with beefy mids and thick lows. While the alder tonewood provides strong, full-bodied sounds, the maple and laurel combination opens up the guitar’s midrange and gives the highs plenty of warmth and sparkle.</p>

            <h5 class="subtitle">Beautifully designed</h5>
            <p>Featuring a set of single-coil strat pickups, the squire produces a strong, clear tones that you would find on a Fender Stratocaster. Its 6-saddle tremolo bridge and die-cast tuners ensure the guitar stays in-tune, while providing the ability to create classic pitch bends. Volume and tone controls provide control over the guitars pickups, while the 5 way selector offers a range of powerful tones, creating a very versatile guitar.</p>

            <h5 class="subtitle">Affinity series</h5>
            <p>The Affinity Series Stratocaster has a proud heritage and has always been very popular due to its well known format. The contoured solid alder body is the same world-renowned style that fuelled the fires of Hendrix, Clapton, SRV, and thousands more. The Squier Affinity offers supreme playability as well as a great tone. The simplicity of this guitar allows it to be versatile with all types of players and styles</p>
        </div>

        <div id="specs">
            <hr>
            <h3 class="title">Specifications</h3>
            <p>
                Model Number: 0310600596<br>
                Series: Affinity
            </p>
            <h5 class="subtitle">Body & bridge</h5>
            <p>
                Body: Alder<br>
                Shape: Stratocaster<br>
                Bridge: 6-Saddle Vintage-Style Synchronised Tremolo<br>
                Construction: Bolt-On<br>
                Finish: Competition Orange<br>
            </p>
            <h5 class="subtitle">Neck & Fingerboard</h5>
            <p>
                Neck: Maple<br>
                Profile: "C"<br>
                Scale Length: 25.5"<br>
                Fingerboard: Laurel<br>
                Radius: 9.5"<br>
                Frets: 21 Medium Jumbo<br>
                Inlays: Pearloid Dots<br>
                Nut: Synthetic Bone<br>
                Nut Width: 1.6"<br>
            </p>
        </div>

        <div id="contacts">
            <hr>
            <h3 class="title">Contact us</h3>
            
            <form id="form" action="https://www.freecodecamp.com/email-submit">
                <label for="name" id="name">Name</label>
                <input type="text" name="name" class="textInputs" placeholder="John Smith" required>

                <label for="email">Email</label>
                <input type="email" name="email" class="textInputs" id="email" placeholder="johnsmith@gmail.com" required>

                <label for="msg">Message</label>
                <textarea name="msg" id="msgBox" cols="30" rows="10" required></textarea>

                <input type="submit" id="submit">
            </form>
        </div>
    </div>

    <footer>
        <div id="footer-content">
            <a href="#">Privacy</a>
            <a href="#">Terms</a>
            <p>Copyright 2020, Fender</p>
        </div>
        
    </footer>
</body>

</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

* {
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: #3F3F3F;
    min-width: 320px;
}

hr {
    border: 2px solid #4A4A4A;
}

/* Header and navigation */
header {
    width: 100%;
    position: fixed;
    top: 0;
    background-color: #E7E7E7;
    padding: 5px 0 0 0;
    font-size: 12px;
    z-index: 1;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

#header-content {
    width: 95%;
    margin: auto;
}

#header-img {
    display: block;
    width: 50px;
    margin: auto;
}

nav {
    text-align: center;
    padding: 5px 0 0 0;
}

nav ul li {
    display: inline;
    
}

nav a {
    text-decoration: none;
    padding: 0 0 0 20px;
    color: #3F3F3F;
}

.nav-link:hover {
    color: black;
}

.wrapper {
    margin: 60px auto 0;
    width: 95%
}

/* Landing section */
main {
    padding-top: 20px;
}

#video {
    width: 100%;
}

main h3 {
    font-size: 25px;
}

#price {
    font-size: 20px;
    margin-bottom: 15px;
}

main h4 {
    font-size: 20px;
}

#features {
    font-size: 13px;
}

.guitarPics {
    display: flex;
}

.guitarPics img {
    width: 45%;
    margin: 15px auto 15px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

/* Buttons */
.btn {
    background-color: #4A4A4A;
    border-radius: 20px;
    margin: 10px auto 0;
    width: 150px;

}

.btn:hover {
    cursor: pointer;
}

.btn p {
    text-align: center;
    font-size: 15px;
    padding: 10px;
    color: white;
}

/* Description */
#description {
    margin: 50px 0 50px;
    padding-top: 77px;
}

.title {
    font-size: 20px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    margin-top: 8px;
}

#description p {
    line-height: 20px;
    font-size: 13px;
}

/* Specifications */
#specs p {
    line-height: 20px;
    font-size: 13px;
}

#specs {
    padding-top: 78px;
}

/* Contacts */
#contacts {
    margin-top: 50px;
    padding-top: 78px;
}

form label {
    display: block;
    font-size: 14px;
    margin-top: 10px;
}

.textInputs {
    width: 100%;
    margin-top: 3px;
    height: 35px;
    border: none;
    border-radius: 5px;
    background-color: #E7E7E7;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.4);;
}

form textarea {
    max-width: 100%;
    min-width: 100%;
    min-height: 90%;
    width: 100%;
    margin-top: 3px;
    height: 35px;
    border: none;
    border-radius: 5px;
    background-color: #E7E7E7;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.4);;
    height: 100px;
}

#submit {
    border: none;
    display: block;
    margin: 20px auto 0;
    background-color: #4A4A4A;
    border-radius: 20px;
    margin: 20px auto;
    width: 100px;
    font-size: 15px;
    padding: 10px 0;
    color: white;
}

#submit:hover {
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #E7E7E7;
    width: 100%;
    font-size: 10px;
    padding: 2px 0;
}

#footer-content {
    width: 95%;
    margin: auto;
}

footer a {
    display: block;
}

@media only screen and (min-width: 768px) {

    .wrapper, #header-content, #footer-content {
        width: 80%;
    }

    header {
        padding: 5px 0;
    }

    header img {
        float: left;
    }

    header ul {
        float: right;
        padding: 7px 0;
    } 

    header ul li {
        font-size: 14px;
        padding: 0 0 0 35px;
    }
}

@media only screen and (min-width: 1200px) {

    .wrapper {
        width: 75%;
    }

    header {
        padding: 10px 0;
    }

    .nav-link {
        font-size: 16px;
    }

    #header-img {
        width: 80px;
    }

    #header-content {
        width: 75%;
    }

    #video {
        width: 50%;
        float: left;
        margin-right: 15px;
    }

   #mainText {
       font-size: 32px;
   }

   #price {
       font-size: 28px;
   }

   #main-content h4 {
       font-size: 22px;
   }

   #features {
        font-size: 15px;
   }

   #main-content {
       margin-bottom: 110px;
   }

   .guitarPics img {
       width: 40%;
       height: auto;
   }

   #contacts {
       width: 60%;
   }

   #footer-content {
       width: 75%;
       font-size: 12px;
   }
}
              
            
!

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