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

              
                <head><link href="https://fonts.googleapis.com/css?family=Bitter&display=swap" rel="stylesheet">
  </head>
<body>
  <header id="header">
    <nav id="nav-bar">
      <ul>
        <li><a href="#title" class="nav-link">About us</a></li>
        <li><a href="#form" class="nav-link">Form</a></li> 
        <li><a href="#intro" class="nav-link">Intro</a></li> 
      </ul>
      <img id="header-img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRU7aZ3Wwk7FouD19iBfQoQisqDzhPU08gpyD0VkyOheqLCX8OM">
  </nav>
   </header>
 <div id="intro">
    <h1 id="title">The Mindfulness Youth Project</h1>
    <h2>Free Workshop on How to Master the art of Awareness</h2>
      <p class="main-p">We are offering our services for free this coming Saturday <strong>(19-10/2019)</strong>, there only 20 seats to be filled so book your ticket today</p>
  <div>
    <form id="form" action="http://www.freecodecamp.com/email-submit">
    <input name="email" id="email" type="email" placeholder="Enter your email address" required/><br>
   <input id="submit" type="submit" value="Submit" class="btn"/>
       </form>
  </div>
 </div>
  <br>
    <div class="details">
      <section class="embed-vid">
      <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/9gi2ER4pSaU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen controls></iframe>
    </section>
      <div class="text">
     <h2>Course Details</h2>
        <br>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><br>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse</p>
        <br>
       <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
 </div>
  </div>
 <footer>
    <nav>
        <p><a href="#">Terms of Use</a> | <a href="#">Privacy Policy</a></p>
    </nav>
    <p>Copyright &copy; 2019 The Mindfulness Youth Project</p>
</footer>
   <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>
              
            
!

CSS

              
                *{
  margin: 0;
  padding: 0;
}
body{
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: 'Bitter', serif;
  line-height: 1.8;
}

/*header section*/
#header{
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  background-color: #f2f2f2;
}
#nav-bar {
  overflow: hidden;
  position: fixed;
  top: 0;
  background-color: #f2f2f2;
  width: 100%;
  border-bottom: 3px solid #C0C0C0;
}
#nav-bar ul {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
#nav-bar ul li{
  list-style: none;
}
#nav-bar ul li a {
  text-decoration: none;
  color: black;
  font-size: 2em;
  margin: 0;
  padding: 0 1em;
}
#nav-bar ul li a:hover{
  color: #C0C0C0;
}
#nav-bar ul li a:active{
  color: red;
}
#header-img {
  display: inline-flex;
  width: 80px;
  float: right;
}

/*Headings section*/
#intro {
  display: block;
  background: url("https://imagesvc.meredithcorp.io/v3/mm/image?url=https%3A%2F%2Fstatic.onecms.io%2Fwp-content%2Fuploads%2Fsites%2F35%2F2019%2F02%2F03193644%2Fhow-to-meditate-beginners-guide-meditation.jpg&q=85") no-repeat;
  height: 450px;
  padding-top: 591.44px / 1127.34px * 100%;
  background-position:center center;
  background-size: 100% 100%;
  background-attachment: absolute;
  text-align: center;
  color: black;
}

#title {
  margin-top: 1em;
  font-size: 2em;
  text-align: center;
}
.main-p{
  font-size: 18px;
}
/*Forms section*/
#form{
  margin-top: 40px;
}
input[type="submit"]{
  width:20%;
  background-color:#696969;
  color: white;
  cursor: pointer;
  size: 15px;
  margin: 10px 0;
  padding: 10px;
  border: none;
}
input[type="submit"]:hover{
  background-color: #C0C0C0;
  color: black;
  box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
input[type="submit"]:active{
  background-color: black;
  color: grey;
}

/*Video and Course details section*/
#video { 
  margin: 40px;
  height : 300px;
  width: 400px;
}
.details{
  display: inline-flex; 
}
.text{
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

/*Footer section*/
footer{
  display: inline-block;
  width: 100%;
  background-color: #f2f2f2;
  border-top: 3px solid #C0C0C0;
  text-align: center;
}

@media screen and (max-width: 600px) {
 body{
  flex-direction: column;
 }
  #nav-bar ul {
    margin: auto;
  }
  
 #header-img {
  display: none;
}
  #intro{
    margin-top: 50px;
   padding: 0 20px;
  }
  #video { 
  height : 300px ;
  width: 400px;
}
.details{
  display: block; 
  text-align: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console