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

              
                
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.3/css/all.css" integrity="sha384-SZXxX4whJ79/gErwcOYf+zWLeJdY/qpuqC4cAa9rOGUstPomtqpuNWT9wdPEn2fk" crossorigin="anonymous">
<header id="header">

  <nav id="nav-bar"> 
   
  <ul>
    <li><a class="nav-link" href="#about_us"> about us </a></li>
    <li><a class="nav-link" href="#our-products"> Our products</a> </li>
    <li> <a class="nav-link" href="#prices"> Prices</a> </li>
    </ul>
     </nav>
    <div class="container">
  <div class="title">
  <h1> <i class="fas fa-headphones"></i>JQ </h1>
  <p> Best choice for audiophiles </p>
    </div>
    <div class="img">
  <img id="header-img" src="https://i.postimg.cc/mkbnDK9G/bg-image.jpg" alt="woman with headphones">
</div>
</header>
  <main>
    <section id="about_us"> 
      <div class="about">
      <h2> Welcome to <i class="fas fa-headphones"></i>JQ </h2>
      <p> Our company was founded in 1997 in Philadelphia by two musicians Jack Oldfield and Mark Webber.  Our products are distinguished by attention to details and the quality of the materials used. We want our headphones to let you enjoy pristine sound wherever you are ... So go ahead and feel free to discover the beautiful world of sound with JQ.</p>
      </div>
        </section>
      
    <div  id="our-products">
      <h2> Our products </h2>
    </div>
      <div class="wrapper">
      <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/nuNYtj8keaE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div>
    
    <div class="product-cards" id="prices">
      <div class="card1">
        <img src="https://i.postimg.cc/pVDNJ04b/pexels-garrett-morrow-1649771.jpg" alt="headphones-black"><!-- Zdjęcie autorstwa Garrett Morrow z Pexels-->
        <h4> On-ear headphones WXF-80</h4>
        <p class="price"> $350 </p>
        <p class="one"> Modern design, high-quality leather.</p>
      </div>
       <div class="card1">
        <img src="https://i.postimg.cc/mDLZW009/pexels-jacoby-clarke-5249311.jpg" alt="headphones-black"> <!--Zdjęcie autorstwa Jacoby Clarke z Pexels-->
        <h4> On-ear headphones WXF-12</h4>
        <p class="price"> $550 </p>
         <p class="one"> Vintage-style,  wooden elements. </p>
      </div>
       <div class="card1">
        <img src="https://i.postimg.cc/pLkRY09X/pexels-soulful-pizza-3780681.jpg" alt="headphones-black"> <!--Zdjęcie autorstwa Soulful Pizza z Pexels-->
        <h4> Earbuds WXF-35</h4>
        <p class="price"> $350 </p>
         <p class="one"> High quality sound in small piece. </p>
      </div>
    </div>
    <div class="submission">
    <h3> If you want to get news from us submit your email </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="Submit" class="btn" />
    </form>
    </div>
    </main>
    
    </div>
    
<footer> &copy MagWebDev</footer>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Style+Script&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}
body {
  background-color: ;
}

#nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: white;
}
#nav-bar ul {
  display: flex;

  flex-direction: row;
  list-style-type: none;
  justify-content: space-around;
  border-bottom: 0.125em solid white;
  padding: 0.35em 0;
}
#nav-bar li {
  font-size: 1.3rem;
  text-transform: uppercase;
}
#nav-bar a {
  text-decoration: none;
  color: black;
}
#nav-bar a:hover {
  color: grey;
}
#header {
  width: 100%;
  margin: 0 auto;
  padding: 2em;
}
#header-img {
  width: 100%;
  border-radius: 15px;
}
.title {
  padding: 1.8em 0;

  font-size: 2rem;
  font-family: "Montserrat", sans-serif;
  width: 100%;
  margin: 0 auto;

  text-align: center;
}
.title i {
  padding-right: 0.25em;
}

.title p {
  font-size: 1.2em;
  letter-spacing: 0.5rem;
  font-family: "Style Script", cursive;
}
.about {
  width: 100%;
  padding: 2.5em;
}
.about h2 {
  padding: 1em;
  text-align: center;
}
.about p {
  font-weight: 400;
  padding: 1em;
}
i {
  padding: 0 0.25em;
}
#our-products h2 {
  padding: 2em;
  text-align: center;
  text-transform: uppercase;
}
.wrapper {
    margin: 0 auto;
    height: 400px;
    width: 600px;
}

.product-cards {
  margin-top: 2em;
  display: flex;
  padding: 4em 2.5em;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}

.card1 {
  width: 250px;
  height: auto;
  text-align: center;
  border: 0.5px solid grey;
  border-radius: 15px;
}
.card1 img {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  width: 250px;
}
.card1 h4 {
  font-size: 0.9rem;
  padding: 0.5em;
}
.price {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  padding: 0.7em;
  text-align: center;
}

.one {
  padding: 1em;
}
.submission {
  text-align: center;
  padding: 1.5em;
}
.submission h3 {
  padding: 1em;
}

#form {
  display: block;
  text-align: center;
}
input[type="email"] {
  max-width: 250px;
  width: 250px;
  padding: 0.5em;
}
.btn {
  padding: 0.5em;
  color: white;
  background-color: #000;
}

.btn:hover {
  color: #ffb703;
}

footer {
  text-align: center;
  background-color: #000;
  color: white;
  padding: 0.5em;
}
@media (max-width: 750px) {
  .container {
    margin-top: 2.5em;
  }
  #nav-bar ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #nav-bar li {
    width: 100%;
    text-align: center;
    padding: 0.25em 0;
  }

  iframe {
    max-width: 70%;
    height: auto;
  }
  .product-cards {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 385px) {
  .btn {
    margin-top: 0.5em;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console