Skip to content
  • SiteMap
  • Our Services
  • Frequently Asked Questions (FAQ)
  • Support
  • About Us

UpdateGadh

Update Your Skills.

  • Home
  • Projects
    •  Blockchain projects
    • Python Project
    • Data Science
    •  Ai projects
    • Machine Learning
    • PHP Project
    • React Projects
    • Java Project
    • SpringBoot
    • JSP Projects
    • Java Script Projects
    • Code Snippet
    • Free Projects
  • Tutorials
    • Ai
    • Machine Learning
    • Advance Python
    • Advance SQL
    • DBMS Tutorial
    • Data Analyst
    • Deep Learning Tutorial
    • Data Science
    • Nodejs Tutorial
  • Blog
  • Contact us
  • Toggle search form
How to Create a Promo Code using html css Js (Free Source Code) - 1

How to Create a Promo Code using html css Js (Free Source Code)

Posted on October 31, 2023January 1, 2026 By Updategadh No Comments on How to Create a Promo Code using html css Js (Free Source Code)

Create a Promo Code

Hello guys, today I am going to show you how to create a Promo Code using HTML CSS & JavaScript, in this video, I will create a JavaScript signature pad using the JavaScript library.

Check Other Projects

How to Create a Promo Code using html css Js (Free Source Code)
Build a Signature Pad in HTML, CSS, JS & Canvas
Build a Signature Pad
How to Create a Promo Code using html css Js (Free Source Code)updategadh.com

Step-by-step Create a Promo Code

Establishing a Project

For the purpose of making a fantastic responsive website footer, we must establish a new project folder and files (index.html, style.css) in this phase. You will begin building the webpage’s structure in the following step.

You saw a demo of a Create a Promo Code and how I made it using HTML, CSS, and JavaScript in the video above. As you can see, I utilized the preserve So, even if you’re a newbie, I believe you understand the codes and principles behind developing this QR app.

If you liked our Create a Promo Code and want to acquire the source codes or files, you may do so at the bottom of this page. But, if you’re a newbie, I recommend watching the above video two or three times and attempting to construct it yourself because I’ve explained each JavaScript line with written comments in the video.

WhatsApp Group Join Now
Youtube Click here
Instagram Click here
Telegram Group Join Now
  • Create a Promo Code
  • Step-by-step Create a Promo Code
  • Establishing a Project
    • You might like this:
  • Create a Promo Code [Source Codes]
    • You might like this:

You might like this:

Check Other Projects

How to Create a Promo Code using html css Js (Free Source Code)
How to Build Library Management System Using HTML, CSS, and JavaScript (Source Code) Just 3 Simple Steps! 💥”
Library Management System
How to Create a Promo Code using html css Js (Free Source Code)updategadh.com
  • How To Create a Parallax Scrolling Effect

Create a Promo Code
Create a Promo Code

Create a Promo Code [Source Codes]

In JavaScript, develop a Create a Promo Code . First, you must generate three files: HTML, CSS, and JavaScript. Simply copy and paste the supplied codes into your file after you’ve created these files.

1 Create the HTML structure: Start by defining the basic structure of your web page. In your HTML file, use the following structure:


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="style.css" />
    <title>Promo Code</title>
  </head>
  <body>
    <div class="present" id="present">
      <div class="lid">
        <span></span>
      </div>
      <div class="promo">
        <h2>updategadh.com</h2>
        <p>30% off (Use Promo Code:UPG232)</p>
      </div>
      <div class="box">
        <span></span>
        <span></span>
      </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.4.0/dist/confetti.browser.min.js"></script>
    <script src="script.js"></script>
  </body>
</html>

Step 2: Add CSS Styles

Define your CSS styles to format and style the various elements within your Create a Promo Code. Customize the styles to match your design preferences.

@import url("https://fonts.googleapis.com/css2?family=Itim&display=swap");

* {
  box-sizing: border-box;
}

body {
  background: #232526; 
  background: linear-gradient(to top,   #414345, #232526); 
  font-family: "Itim", cursive;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.present {
  width: 410px;
  max-width: 90vw;
  margin: 0 auto;
  cursor: pointer;
}

.box {
  width: 400px;
  max-width: 90vw;
  height: 250px;
}

.box,
.lid {
  background: radial-gradient(white 15%, transparent 15.1%),
    radial-gradient(white 15%, transparent 15.1%), rgb(240, 58, 58);
  background-position: 0 0, 25px 25px;
  background-size: 50px 50px;
  position: relative;
  margin: 0 auto;
}

.lid {
  width: 400px;
  max-width: 90vw;
  height: 70px;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
  z-index: 1;
  padding: 0 2px;
  background-color: rgb(216, 52, 52);
  top: 0;
  left: 0;
  transition: top ease-out 0.5s, left ease-out 0.5s, transform ease-out 0.5s;
}

.box span,
.lid span {
  position: absolute;
  display: block;
  background: rgba(235, 199, 0, 0.8);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
}

.box span:first-child {
  width: 100%;
  height: 60px;
  top: 80px;
}

.box span:last-child,
.lid span {
  width: 60px;
  height: 100%;
  left: 170px;
}

.promo {
  font-size: 30px;
  color: white;
  text-align: center;
  position: relative;
  height: 0;
  top: 10px;
  transition: all ease-out 0.7s;
}

.promo p {
  font-size: 24px;
  margin: 0;
}

.promo h2 {
  font-size: 40px;
  margin: 0;
}

.present:hover .lid {
  top: -100px;
  transform: rotateZ(10deg);
  left: 10px;
}

.present:hover .promo {
  top: -80px;
}

You might like this:

Check Other Projects

How to Create a Promo Code using html css Js (Free Source Code)
Build a Quiz Application with HTML, CSS, and JavaScript, Free Source Code
Build a Quiz Application
How to Create a Promo Code using html css Js (Free Source Code)updategadh.com

Step 3 : Create JavaScript Functionality (script.js)

Write JavaScript code to handle user interactions

const present = document.getElementById("present");
const options = {
  colors: [
    "#34D963",
    "#068C2C",
    "#FF5757",
    "#8C1414",
    "#D9D74A",
    "#1E91D9",
    "#1B608C",
  ],
};

present.addEventListener("mouseenter", () => {
  confetti(options);
});
present.addEventListener("touchstart", () => {
  confetti(options);
});

Download Complete Free Code –

Telegram Group Join Now
  • Online Examination System in PHP with Source Code
    Online Examination System in PHP with Source Code
    by Updategadh
  • AI Chatbot for College
    AI Chatbot for College and Hospital
    by Updategadh
  • Job Portal Web Application in PHP MySQL with Source Code 2026
    Job Portal Web Application in PHP MySQL
    by Updategadh
  • Online Tutorial Portal Site in PHP MySQL — Full Project with Source Code
    Online Tutorial Portal Site in PHP MySQL — Full Project with Source Code
    by Updategadh
  • Online Job Portal System in JSP Servlet MySQL
    Online Job Portal System in JSP Servlet MySQL
    by Updategadh
Post Views: 863
Javascript Project Tags:Java Script, JavaScript

Post navigation

Previous Post: Captcha Generator JavaScript | Step By Step JavaScript Project
Next Post: Recruitment Management System in PHP MySQL

More Related Articles

Secrets How to Design Digital Clock using JavaScript ! - Image 7 Secrets How to Design Digital Clock using JavaScript ! Javascript Project
Build a Signature Pad in HTML, CSS, JS & Canvas - Build Signature Pad Build a Signature Pad in HTML, CSS, JS & Canvas Javascript Project
how to create an OLX clone using React OLX Clone Using React.js Free Source Code Javascript Project

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may also like

  1. How to Create a CSS Page Loading Spinner
  2. How To Create an Icon Bar with Html CSS
  3. Secrets How to Design Digital Clock using JavaScript !
  4. Build a Signature Pad in HTML, CSS, JS & Canvas
  5. Captcha Generator JavaScript | Step By Step JavaScript Project
  6. E-Waste Facility Locator

Most Viewed Posts

  1. Top Large Language Models in 2025
  2. Online Shopping System using PHP, MySQL with Free Source Code
  3. login form in php and mysql , Step-by-Step with Free Source Code
  4. Flipkart Clone using PHP And MYSQL Free Source Code
  5. News Portal Project in PHP and MySql Free Source Code
  6. User Login & Registration System Using PHP and MySQL Free Code
  7. Top 10 Final Year Project Ideas in Python
  8. Online Bike Rental Management System Using PHP and MySQL
  9. E learning Website in php with Free source code
  10. E-Commerce Website Project in Java Servlets (JSP)
  • AI
  • ASP.NET
  • Blockchain
  • ChatCPT
  • code Snippets
  • Collage Projects
  • Data Science Project
  • Data Science Tutorial
  • DBMS Tutorial
  • Deep Learning Tutorial
  • Final Year Projects
  • Free Projects
  • How to
  • html
  • Interview Question
  • Java Notes
  • Java Project
  • Java Script Notes
  • JAVASCRIPT
  • Javascript Project
  • JSP JAVA(J2EE)
  • Machine Learning Project
  • Machine Learning Tutorial
  • MySQL Tutorial
  • Node.js Tutorial
  • PHP Project
  • Portfolio
  • Python
  • Python Interview Question
  • Python Projects
  • PythonFreeProject
  • React Free Project
  • React Projects
  • Spring boot
  • SQL Tutorial
  • TOP 10
  • Uncategorized
  • Online Examination System in PHP with Source Code
  • AI Chatbot for College and Hospital
  • Job Portal Web Application in PHP MySQL
  • Online Tutorial Portal Site in PHP MySQL — Full Project with Source Code
  • Online Job Portal System in JSP Servlet MySQL

Most Viewed Posts

  • Top Large Language Models in 2025 (8,614)
  • Online Shopping System using PHP, MySQL with Free Source Code (5,215)
  • login form in php and mysql , Step-by-Step with Free Source Code (4,869)

Copyright © 2026 UpdateGadh.

Powered by PressBook Green WordPress theme