HTML Projects: Responsive Product Landing Page

HTML Projects 2 - Responsive Product Landing Page


Website Product Display Using html css js



In this Post we will see that how to create Product landing page design with HTML, CSS & JAVASCRIPT. I have recently shared a project No 1 - Survey Form . This Website is Complete Responsive and easy to understand the code.

Product website where you ad your product using this product landing Page design. you have to do only the some things You have to change the Image and place your image. Download the source code at last just scrolling...


Main Features :-

  • Responsive Left column / Headphone Image
  • Responsive Product Description in Right column
  • Product Color
  • Cable Configuration
  • Product Pricing

Source Code :-


This is the Html File At First you have to create file in you editor like this - index.html and then paste it in index.html file.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Tutorial</title>
    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"
 rel="stylesheet">
    <!-- CSS -->
    <link href="style.css" rel="stylesheet">
    <meta name="robots" content="noindex,follow" />

  </head>

  <body>
    <main class="container">

      <!-- Left Column / Headphones Image -->
      <div class="left-column">
        <img data-image="black" src="images/black.png" alt="">
        <img data-image="blue" src="images/blue.png" alt="">
        <img data-image="red" class="active" src="images/red.png" alt="">
      </div>


      <!-- Right Column -->
      <div class="right-column">

        <!-- Product Description -->
        <div class="product-description">
          <span>Headphones</span>
          <h1>Beats EP</h1>
          <p>The preferred choice of a vast range of acclaimed DJs. Punchy,
            bass-focused sound and high isolation.
             Sturdy headband and on-ear cushions suitable for live performance</p>
        </div>

        <!-- Product Configuration -->
        <div class="product-configuration">

          <!-- Product Color -->
          <div class="product-color">
            <span>Color</span>

            <div class="color-choose">
              <div>
                <input data-image="red" type="radio" id="red" name="color" 
                value="red" checked>
                <label for="red"><span></span></label>
              </div>
              <div>
                <input data-image="blue" type="radio" id="blue" name="color"
                 value="blue">
                <label for="blue"><span></span></label>
              </div>
              <div>
                <input data-image="black" type="radio" id="black" name="color"
                 value="black">
                <label for="black"><span></span></label>
              </div>
            </div>

          </div>

          <!-- Cable Configuration -->
          <div class="cable-config">
            <span>Cable configuration</span>

            <div class="cable-choose">
              <button>Straight</button>
              <button>Coiled</button>
              <button>Long-coiled</button>
            </div>

            <a href="#">How to configurate your headphones</a>
          </div>
        </div>

        <!-- Product Pricing -->
        <div class="product-price">
          <span>148$</span>
          <a href="#" class="cart-btn">Add to cart</a>
        </div>
      </div>
    </main>

    <!-- Scripts -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" 
    charset="utf-8"></script>
    <script src="script.js" charset="utf-8"></script>
  </body>
</html>



This is the CSS File Now, you have to create a CSS File like this - style.css   then paste the below code in style.css file.

/* Basic Styling */
htmlbody {
  height100%;
  width100%;
  margin0;
  font-family'Roboto'sans-serif;
}

.container {
  max-width1200px;
  margin0 auto;
  padding15px;
  displayflex;
}

/* Columns */
.left-column {
  width65%;
  positionrelative;
}

.right-column {
  width35%;
  margin-top60px;
}


/* Left Column */
.left-column img {
  width100%;
  positionabsolute;
  left0;
  top0;
  opacity0;
  transitionall 0.3s ease;
}

.left-column img.active {
  opacity1;
}


/* Right Column */

/* Product Description */
.product-description {
  border-bottom1px solid #E1E8EE;
  margin-bottom20px;
}
.product-description span {
  font-size12px;
  color#358ED7;
  letter-spacing1px;
  text-transformuppercase;
  text-decorationnone;
}
.product-description h1 {
  font-weight300;
  font-size52px;
  color#43484D;
  letter-spacing-2px;
}
.product-description p {
  font-size16px;
  font-weight300;
  color#86939E;
  line-height24px;
}

/* Product Configuration */
.product-color span,
.cable-config span {
  font-size14px;
  font-weight400;
  color#86939E;
  margin-bottom20px;
  displayinline-block;
}

/* Product Color */
.product-color {
  margin-bottom30px;
}

.color-choose div {
  displayinline-block;
}

.color-choose input[type="radio"] {
  displaynone;
}

.color-choose input[type="radio"+ label span {
  displayinline-block;
  width40px;
  height40px;
  margin-1px 4px 0 0;
  vertical-alignmiddle;
  cursorpointer;
  border-radius50%;
}

.color-choose input[type="radio"+ label span {
  border2px solid #FFFFFF;
  box-shadow0 1px 3px 0 rgba(0,0,0,0.33);
}

.color-choose input[type="radio"]#red + label span {
  background-color#C91524;
}
.color-choose input[type="radio"]#blue + label span {
  background-color#314780;
}
.color-choose input[type="radio"]#black + label span {
  background-color#323232;
}

.color-choose input[type="radio"]:checked + label span {
  background-imageurl(images/check-icn.svg);
  background-repeatno-repeat;
  background-positioncenter;
}

/* Cable Configuration */
.cable-choose {
  margin-bottom20px;
}

.cable-choose button {
  border2px solid #E1E8EE;
  border-radius6px;
  padding13px 20px;
  font-size14px;
  color#5E6977;
  background-color#fff;
  cursorpointer;
  transitionall .5s;
}

.cable-choose button:hover,
.cable-choose button:active,
.cable-choose button:focus {
  border2px solid #86939E;
  outlinenone;
}

.cable-config {
  border-bottom1px solid #E1E8EE;
  margin-bottom20px;
}

.cable-config a {
  color#358ED7;
  text-decorationnone;
  font-size12px;
  positionrelative;
  margin10px 0;
  displayinline-block;
}
.cable-config a:before {
  content"?";
  height15px;
  width15px;
  border-radius50%;
  border2px solid rgba(531422150.5);
  displayinline-block;
  text-aligncenter;
  line-height16px;
  opacity0.5;
  margin-right5px;
}

/* Product Price */
.product-price {
  displayflex;
  align-itemscenter;
}

.product-price span {
  font-size26px;
  font-weight300;
  color#43474D;
  margin-right20px;
}

.cart-btn {
  displayinline-block;
  background-color#7DC855;
  border-radius6px;
  font-size16px;
  color#FFFFFF;
  text-decorationnone;
  padding12px 30px;
  transitionall .5s;
}
.cart-btn:hover {
  background-color#64af3d;
}

/* Responsive */
@media (max-width940px) {
  .container {
    flex-directioncolumn;
    margin-top60px;
  }

  .left-column,
  .right-column {
    width100%;
  }

  .left-column img {
    width300px;
    right0;
    top-65px;
    leftinitial;
  }
}

@media (max-width535px) {
  .left-column img {
    width220px;
    top-85px;
  }
}



This is the Javascript Code Again you have to create a js file like this- script.js file
and then paste the below code in the script.js file.

$(document).ready(function() {

  $('.color-choose input').on('click'function() {
      var headphonesColor = $(this).attr('data-image');

      $('.active').removeClass('active');
      $('.left-column img[data-image = ' + headphonesColor + ']').addClass('active');
      $(this).addClass('active');
  });

});


OutPut :-



Download Source Code:-

That’s all, now you’ve successfully created a Responsive Product Website using HTML CSS & JavaScript. If your code does not work or you’ve faced any error/problem then please download the source code files from the given download button. It’s free and a .zip file will be downloaded then you’ve to extract it.


Download Source Code From here👇

If you face any problem during downloading or after downloading the source code files then feel free to comment down or contact us through the contact page.


Download Now

1 Comments

Please Do Not Enter Any Spam Link In The Comment Box.

Post a Comment
Previous Post Next Post