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

              
                <html>
  <head><script src="https://kit.fontawesome.com/ee7bba4049.js" crossorigin="anonymous"></script>
  </head>
 <header id="header">
    <img id="header-img" src="https://i.ibb.co/3FFGz0Q/Thermos-Logo.png"> 
    <nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#form"> Why Thermos?</a></li>
        <li><a class="nav-link" href="#video">Advert</a></li>
        <li><a class="nav-link" href="#prices">Prices</a></li>
      </ul>
        </nav>
  </header>
  <form action="https://www.freecodecamp.com/email-submit" id="form">
    <h2>Hot? Cold? Personal? For the family?</h2>
    <h3>Choose Thermos!</h3>
    <i id="temp" class="fas fa-thermometer-half"></i>
    <div id="temp-txt" class="body-info"><h4>For all your needs</h4>
  <p>Our vacuum insulated glass double wall keeps contents hot for 12 hours or cold for 24 hours.
        </p></div>
    <i id="truck" class="fas fa-truck"></i>
    <div id="truck-txt" class="body-info"><h4>Fast delivery</h4>
        <p>Order before 1pm and get your thermos next day.</p> </div> 
    <i id="tick" class="fas fa-clipboard-check"></i>
    <div id="tick-txt" class="body-info"><h4>Quality Assured</h4>
<p>Free 6 month warranty on every purchase. Our products are well tested so we are confident you will be 100% satisfied.</p> </div>
    <input id="email" type="email" name="email" placeholder="Enter email address" required>
    <input id="submit" type="submit" name="email">
    <video id="video" width="480"
           height="320" controls>
      <source src="https://www.youtube.com/watch?v=wFnwhlVOXlM&ab_channel=TobyRyston-Pratt" type="video/mp4">Your browser does not support this video
     </video>
    </form>
  <div id="prices">
    <div class="price-info">
      <div class="price-content"><h5>Personal</h5>
        <p>£11.99</p>
      <img class="img" src="https://thermos.co.uk/pub/media/catalog/product/cache/cb9f11d5be016bf6d48fd62f97e92159/s/t/stainless-king-flask-copper-470ml-170272_2.jpg"></div>
    </div>
    <div class="price-info">
      <div class="price-content"><h5>For Sharing</h5>
        <p>£17.99</p>
      <img class="img" src="https://thermos.co.uk/pub/media/catalog/product/cache/cb9f11d5be016bf6d48fd62f97e92159/s/t/stainless-king-food-flask-midnight-blue-710ml_2.jpg"></div>
    </div>
    <div class="price-info">
      <div class="price-content"><h5>Family Sized</h5>
        <p>£24.99</p>
      <img class="img" src="https://thermos.co.uk/pub/media/catalog/product/cache/cb9f11d5be016bf6d48fd62f97e92159/s/t/stainless-king-flask-matt-black-1.2l-190754.jpg"></div>
        </div>
</div>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap');
html {font-family: 'Abril Fatface', cursive;}
header {
  position: fixed;
  max-height: 100px;
  width: 100%;
  display: inline-flex;
  justify-content: space-around;
  align-items: center;
  top: 0;
  background-color: white;
}
.nav-link{
  margin-left: 200px;
  font-size: 20px;
  
}
#header-img {
  margin-right: 100px;
  width: 10vw;
}
ul {
  list-style-type: none;
}
li{
  display: inline-flex;
}
nav a{
  color: black;
  text-decoration: none;
}
#form{
  margin-top: 70px;
  margin-right: auto;
  margin-left: auto;
  max-width: 50%;
  display: grid;
  align-items: center;
  grid-template-columns: 20% 80%;
  grid-template-rows: 50px 50px 100px 100px 100px 50px 50px 330px;
  grid-row-gap: 20px;
}
h2 {
  text-align: center;
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  font-size: 30px;
}
h3 {
  text-align: center;
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  font-size: 30px;
}
i {
  color: blue;
  font-size: 40px;
  margin-left: auto;
  margin-right: auto;
}
#temp {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}
#temp-txt{
  grid-column: 2 / 4;
  grid-row: 3 / 4;
}
#truck {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}
#truck-txt {
  grid-column: 2 / 4;
  grid-row: 4 / 5;
}
#tick{
  grid-column: 1 / 2;
  grid-row: 5 / 6;
}
#tick-txt {
  grid-column: 2 / 4;
  grid-row: 5 / 6;
}
#email {
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  grid-row: 6 / 7;
  grid-column: 1 / 3;
}
#submit {
  width: 15%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  grid-row: 7 / 8;
  grid-column: 1 / 3;
}
video {
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px;
  grid-row: 8 / 9;
  grid-column: 1 / 3;
}
#prices {
  margin-top: 100px;
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  width: 100%
}
.img {
  max-height: 70%;
  max-width: 70%;
}
.price-info {
  border: solid;
  width: 300px;
  height: 350px;
  margin-left: 10px;
  margin-right: 20px;
  display: flex;
  justify-content: center;
}
h5 {
  font-size: 20px;
}
.price-content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-top: 20px;
}
@media (max-width: 480px) {
  #header {flex: flex-wrap;
  max-width: 480px;}
  .prices {flex: flex-wrap;}
  form {max-width: 480px;}
}
@media (max-width: 768px) {
  #header {flex: flex-wrap;
  max-width: 768px;}
  .prices {flex: flex-wrap;}
  form {max-width: 760px;}
}
              
            
!

JS

              
                
              
            
!
999px

Console