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

              
                <!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
	<meta name="description" content="Product Landing Page" />
	<title>Product Landing Page</title>
    <link href="https://fonts.googleapis.com/css?family=Exo:600i&display=swap" rel="stylesheet">
</head>
<body>
    <header id="header">
        <nav id="nav-bar">
            <a href="#models" class="nav-link">Models</a>
            <a href="#specs" class="nav-link">Specs</a>
            <img src="https://vignette.wikia.nocookie.net/gtawiki/images/d/d0/Karin-GTAV-Logo.png/revision/latest?cb=20180722202537" id="header-img">
            <a href="#gallery" class="nav-link">Gallery</a>
            <a href="#contact" class="nav-link">Contact</a>
        </nav>
    </header>
    <article>
        <div id="banner">
            <div id="banner-text">
                <h1>Karin Futo</h1>
                <h2>Karate chop the corners</h2>
            </div>
        </div>
        <div id="models">
            <h1>Choose Your Fighter</h1>
            <div id="model-card-container">
                <div class="model-card">
                    <img src="https://vignette.wikia.nocookie.net/gtawiki/images/0/01/FutoUpdated-GTAO-Frontquarter.png/revision/latest?cb=20180730093155">
                    <h2>Futo</h2>
                    <p>The standard edition includes Karin-trademarked performance & handling, perfect for those who are satsified with what the Futo has to offer without getting too technical.</p>
                </div>
                <div class="model-card">
                    <img src="https://vignette.wikia.nocookie.net/gtawiki/images/6/6a/FutoLivery-GTAO-ClassicDecals.png/revision/latest?cb=20180730094804">
                    <h2>Futo GT</h2>
                    <p>The GT edition comes equipped with an updated chassis, EMS & transmission upgrades, race exhaust kit, tinted windows and xenon headlights to make you feel a part of the Karin Rally Team.</p>
                </div>
            </div>
        </div>
        <div id="specs">
            <table>
                <th colspan="2">Specs</th>
                <tr>
                    <td class="table-subtitle">Top Speed</td>
                    <td>84 (mph) / 135 (kmh)</td>
                </tr>
                <tr>
                    <td class="table-subtitle">Acceleration (0-100kmh in secs)</td>
                    <td>6.8 seconds</td>
                </tr>
                <tr>
                    <td class="table-subtitle">Engine</td>
                    <td>N/A (Naturally Aspirated) Inline 20 valves (Inline-5)</td>
                </tr>
                <tr>
                    <td class="table-subtitle">Drivetrain</td>
                    <td>Rear wheel drive</td>
                </tr>
                <tr>
                    <td class="table-subtitle">Mass</td>
                    <td>900 (kg) / 1984 (lbs)</td>
                </tr>
                <tr>
                    <td class="table-subtitle">Fuel Tank Capacity</td>
                    <td>65 litres</td>
                </tr>
            </table>
        </div>
        <div id="gallery">
            <h1>Gallery</h1>
            <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/Tak6CV_tXAg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
            <div id="image-container">
                <img src="https://vignette.wikia.nocookie.net/gtawiki/images/0/01/FutoUpdated-GTAO-Frontquarter.png/revision/latest?cb=20180730093155">
                <img src="https://vignette.wikia.nocookie.net/gtawiki/images/3/31/FutoUpdated-GTAO-Rearquarter.png/revision/latest?cb=20180730093157">
                <img src="https://vignette.wikia.nocookie.net/gtawiki/images/b/be/FutoUpdated-GTAO-Front.png/revision/latest?cb=20180730093157">
                <img src="https://vignette.wikia.nocookie.net/gtawiki/images/6/60/FutoUpdated-GTAO-Rear.png/revision/latest?cb=20180730093159">
            </div>
        </div>
        <div id="contact">
            <h1>Interested?</h1>
            <form id="form" action="https://www.freecodecamp.com/email-submit">
                <input type="email" id="email" name="email" placeholder="john@example.com" required><input type="submit" id="submit" name="submit" value="Subscribe">
            </form>
        </div>
    </article>
</body>
</html>
              
            
!

CSS

              
                body {
    margin: 0 auto;
    font-family: 'Exo', sans-serif;
}

#header {
    position: fixed;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
    padding-top: 0.5%;
    padding-bottom: 0.5%;
    background-color: white;
}

#nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.nav-link{
    text-decoration: none;
    color: black;
    width: 115px;
}

#header-img {
    width: 10%;
}

article {
    padding-top: 9%;
}

#banner {
    background-image: url("https://cdnb.artstation.com/p/assets/images/images/015/076/545/large/dezirv-jared-enemy.jpg?1546966450");
    color: white;
    background-size: cover;
    background-position: top;
    text-transform: uppercase;
    font-style: italic;
}

#banner-text {
    padding-left: 2%;
    padding-top: 450px;
    padding-bottom: 1%;
}

#banner-text h1 {
    font-size: 3em;
}

#banner-text h2 {
    font-size: 2em;
}

#models {
    background-color: rgb(19, 19, 19);
    color: white;
    padding-top: 1%;
    padding-bottom: 2%;
}

#models h1 {
    text-align: center;
    padding-bottom: 2%;
    font-size: 3em;
}

#model-card-container {
    display: flex;
    align-items: stretch;
    justify-content: space-evenly;
}

.model-card {
    background-color: rgb(32, 32, 32);
    width: 25%;
    text-align: center;
    border-radius: 5px;
    padding: 1%;
}

.model-card h2 {
    border-bottom: 2px solid white;
    padding-bottom: 2%;
}

.model-card img {
    max-width: 75%;
}

.model-card p {
    padding: 0;
    margin: 0;
}

#specs table {
    margin: 2% auto;
    text-align: center;
    border-collapse: collapse;
    width: 40%;
}

#specs table th {
    border: 4px solid black;
    padding: 2%;
    font-size: 1.5em;
}

#specs table td {
    border: 4px solid black;
    padding: 2%;
}

.table-subtitle {
    font-weight: bold;
}

#gallery {
    background-color: rgb(19, 19, 19);
    color: white;
    padding-top: 1%;
    padding-bottom: 2%;
    text-align: center;
}

#gallery h1 {
    font-size: 3em;
}

#image-container {
    display: flex;
    justify-content: space-evenly;
    padding-top: 2%;
}

#gallery img {
    max-width: 20%;
}

#contact {
    text-align: center;
    padding-bottom: 2%;
}

#contact h1 {
    font-size: 3em;
}

#form input[type=email] {
    font-size: 1.5em;
}

#form input[type=submit] {
    font-size: 1.5em;
}

@media only screen and (max-width: 425px) {
    /* #header {
        width: 425px;
    } */

    #header-img {
        width: 15%;
    }

    .nav-link {
        font-size: 0.75em;
        width: 65px;
    }

    #banner-text h1 {
        font-size: 2em;
    }

    #banner-text h2 {
        font-size: 1em;
    }

    #models h1 {
        font-size: 2em;
        padding-bottom: 0;
    }

    #model-card-container {
        display: inline-block;
    }

    .model-card {
        width: 80%;
        margin: 5% auto;
        padding: 2%;
    }

    #specs table {
        width: 80%;
    }

    #gallery h1 {
        font-size: 2em;
    }

    #gallery iframe {
        max-width: 50%;
        height: 155px;
    }

    #image-container {
        flex-wrap: wrap;
    }

    #gallery img {
        max-width: 40%;
        margin-top: 2%;
        height: 110px;
    }

    #contact h1 {
        font-size: 2em;
    }

    #form input[type=email] {
        font-size: 1em;
    }
    
    #form input[type=submit] {
        font-size: 1em;
    }
}

@media only screen and (min-width: 426px) and (max-width: 768px) {
    #header-img {
        width: 12%;
    }

    #banner h1 {
        font-size: 2.5em;
    }

    #banner h2 {
        font-size: 1.5em;
    }

    #models h1 {
        font-size: 2.5em;
    }

    .model-card {
        width: 40%;
    }

    #specs table {
        width: 80%;
    }

    #gallery h1 {
        font-size: 2.5em;
    }

    #gallery iframe {
        max-width: 60%;
    }

    #image-container {
        flex-wrap: wrap;
    }

    #gallery img {
        max-width: 40%;
        margin-top: 2%;
        height: 110px;
    }

    #contact h1 {
        font-size: 2.5em;
    }

    #form input[type=email] {
        font-size: 1em;
    }
    
    #form input[type=submit] {
        font-size: 1em;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console