Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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>

<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous"
/>
        
<header id="header">

  <div class="logo">
    <img
         id="header-img"
         src="https://i.imgur.com/Fk7mB91.png"
         alt="hair care logo"
         >
  </div> 

  <nav id="nav-bar">
    <ul>
      <li><a class="nav-link" href="#about">About</a></li>
      <li><a class="nav-link" href="#features">Features</a></li>
      <li><a class="nav-link" href="#how-it-works">How it works</a></li>
    </ul>
  </nav>
</header>

<article id="about" class="heading-container">

  <div class="heading-photo">
    <img 
         src="https://i.imgur.com/0k5PIhq.png" 
         alt="header illustration">
  </div>

  <div>
    <h1 id="heading">Embrace your <br> natural hair.</h1>
    <h3 id="description">Natural products made for you</h3>

    <form id="form" action="https://www.freecodecamp.com/email-submit">

      <input
             name="email"
             id="email"
             type="email"
             placeholder="Enter your email address"
             required
             >
      <input id="submit" type="submit" value="Get Started" class="button">
    </form>
  </div>

</article>

<article id="features">

  <h1 class="large-title">Our products are:</h1>

  <section class="grid-container">

    <div class="short-paragraph">
      <div class="icon"><i class="fas fa-heart fa-7x"></i></div>
      <h3 class="small-title">Cruelty free</h3>
      <p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Class mauris nibh ultrices eget senectus cubilia turpis aliquam facilisis</p>
    </div>

    <div class="short-paragraph">
      <div class="icon"><i class="fab fa-envira fa-7x"></i></div>
      <h3 class="small-title">Silicone free</h3>
      <p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Class mauris nibh ultrices eget senectus cubilia turpis aliquam facilisis</p>
    </div>

    <div class="short-paragraph">
      <div class="icon"><i class="fas fa-users fa-7x"></i></div>
      <h3 class="small-title">Tested by hundreds</h3>
      <p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Class mauris nibh ultrices eget senectus cubilia turpis aliquam facilisis</p>
    </div>

  </section>

</article>

<article id="how-it-works">

  <div class="grid-container">
    <iframe 
            id="video"
            class="resp-container"
            width="560" 
            height="315" 
            src="https://www.youtube.com/embed/UG-CMivSZaU" 
            frameborder="0" 
            allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
            allowfullscreen></iframe>

    <div class="long-paragraph">
      <h1 class="large-title">Watch them work</h1>
      <p class="adjust">Habitant aptent nam sollicitudin vestibulum viverra nisi etiam iaculis vivamus, porttitor taciti facilisis ante tincidunt mattis malesuada penatibus posuere, lobortis sed mus feugiat id ridiculus ultricies integer.</p>
    </div>

  </div>
</article>

<footer>
  <h4>Made with ❤ by Maru</h4>
</footer>
              
            
!

CSS

              
                /* Body font  */
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');

/* Headings font */

@import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins:wght@700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
    margin: 0;
    background-color: #FFF6BB;
    color: #473508;
}

/* Navigation Bar */

#nav-bar {
    color: white;
    text-align: right;
}

@media (max-width: 700px) {
    #nav-bar {
        text-align: center;
    }
}

li {
    display: inline;
    font-size: 14px;
    margin: 2em;
}

@media (max-width: 700px) {
    li {margin: 1em;}
}

a {
    text-decoration: none;
    font-family: inherit;
    color: inherit;
}


#header { /* Nav Bar Container */
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #473508;
    width: 100%;
    height: auto;
}


.logo > img {
    width: 100%;
    height: auto;
    max-width: 10vw;
    padding-top: 0.30em;
}

@media (max-width: 900px) {
    .logo > img {
        max-width: 15vw;
    }
}

/* About Section  */

#heading { /* Main Title */
    font-family: 'Poppins', sans-serif;
    color: #D86348;
    font-size: 3em;
    margin-bottom: 0.30em;
    
}
@media (max-width: 700px) { 
    #heading {margin-top: 1.5em;}
}

.heading-container { /* About Section Container */
    display: flex;
    justify-content: space-evenly;
    flex-direction: row-reverse;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}

@media (max-width: 700px) {
    .heading-container {
        flex-direction: column-reverse;
        text-align: center;
    }
}

.heading-photo > img {
    width: 100%;
    height: auto;
    max-width: 35vw;
    margin-top: 2em;
} 

@media (max-width: 700px) { 
    .heading-photo > img {
        max-width: 40vw;
        margin: 0;
    }
}

/* Form */

input {
  font-family: inherit;
  font-size: inherit;
  padding: 0.60em;
  border: none;
  
}

.button {
    border: none;
    background-color: #EFA23C;
    color: inherit;
    border-radius: 2px;
    padding: 0.60em;
    font-weight: bold;
}

/* Features and How it works Sections */

.grid-container { /* Main Container */
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    min-height: 65vh;
    margin-bottom: 1em;
}

@media (max-width: 700px) { /* This will adjust the features section*/
    .grid-container {
        flex-direction: column;
        align-items: center;
    }
}

#features { /* To adjust the jumping thing */
    padding-top: 1.5em;
}

.short-paragraph {
    max-width: 22vw;
    text-align: center;
}

@media (max-width: 700px) {
    .short-paragraph {
        max-width: 70vw;
        margin-bottom: 0.30em;
    }
}

.icon {
    color:  #776630;
}

.small-title {
    font-family: 'Poppins', sans-serif;
    color: #D86348;;
    font-size: 1.3em;
}

.large-title {
    font-family: 'Poppins', sans-serif;
    color: #D86348;
    font-size: 3em;
    text-align: center;
}

.long-paragraph {
    max-width: 45vw;
    text-align: center;
}

@media (max-width: 900px) {
    .long-paragraph {
        max-width: 80vw;
    }
}

@media (max-width: 900px) {
    #how-it-works .grid-container { /* This will adjust the how-it-works section*/
        flex-direction: column;
        align-items: center;
    }
}

/* Footer */

footer {
    color: white;
    background-color: #473508;
    text-align: center;
    height: auto;
    padding: 5px 0 5px 0;
    font-weight: lighter;
}

h4 {
    font-weight: lighter;
}
              
            
!

JS

              
                
              
            
!
999px

Console