Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • JS Tutorial
  • JS Exercise
  • JS Interview Questions
  • JS Array
  • JS String
  • JS Object
  • JS Operator
  • JS Date
  • JS Error
  • JS Projects
  • JS Set
  • JS Map
  • JS RegExp
  • JS Math
  • JS Number
  • JS Boolean
  • JS Examples
  • JS Free JS Course
  • JS A to Z Guide
  • JS Formatter
Open In App
Next Article:
Create an Analog Clock using HTML, CSS and JavaScript
Next article icon

How to Design a Simple Calendar using JavaScript?

Last Updated : 25 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

We will Create a calendar using HTML, CSS, and JavaScript that displays the current month and year, and allows the user to navigate to previous and next months. Also, it allows the user to jump to a specific month and year. The calendar should also highlight the current date.

Prerequisites:

  • HTML
  • CSS
  • JavaScript 

The task at hand is to create a webpage that displays a calendar. The calendar should have the functionality to navigate to the previous and next months. The calendar should also be able to display the current date in a different color.

Approach:

  • Create an HTML structure for the calendar using a table and appropriate list elements.
  • Create JavaScript variables to keep track of the current month and year, as well as elements to display the current month and year on the page.
  • Use JavaScript to create a function to display the current month's calendar. This function should take in the current month and year as arguments and use them to determine the number of days in the current month, and the first day of the month, and fill in the appropriate number of days in the calendar.
  • Create JavaScript functions to navigate to the next and previous months.
  • Use JavaScript to add event listeners to the appropriate elements (next and previous buttons) to call the appropriate navigation functions when clicked.

Implementation: Below is the implementation of the above approach:

  • index.html: This file contains the skeleton of calendar
  • styles.css: This file contains CSS to improve the look of the calendar
  • script.js: This file contains the code to make the calendar dynamic

 Example: Here is the implementation of the above-explained steps.

HTML
<!DOCTYPE html> <html lang="en" dir="ltr">  <head>     <meta charset="utf-8">     <title>Calendar</title>     <meta name="viewport"            content="width=device-width, initial-scale=1.0">     <link rel="stylesheet"         href="styles.css">         <link rel="stylesheet"         href= "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,[email protected],100..700,0..1,-50..200">     </head>  <body>     <div class="calendar-container">         <header class="calendar-header">             <p class="calendar-current-date"></p>             <div class="calendar-navigation">                 <span id="calendar-prev"                        class="material-symbols-rounded">                     chevron_left                 </span>                 <span id="calendar-next"                        class="material-symbols-rounded">                     chevron_right                 </span>             </div>         </header>          <div class="calendar-body">             <ul class="calendar-weekdays">                 <li>Sun</li>                 <li>Mon</li>                 <li>Tue</li>                 <li>Wed</li>                 <li>Thu</li>                 <li>Fri</li>                 <li>Sat</li>             </ul>             <ul class="calendar-dates"></ul>         </div>     </div>     <script src="script.js"></script>  </body> </html> 
CSS
* {     margin: 0;     padding: 0;     font-family: 'Poppins', sans-serif; }  body {     display: flex;     background: #ef62da;     min-height: 100vh;     padding: 0 10px;     align-items: center;     justify-content: center; }  .calendar-container {     background: #fff;     width: 450px;     border-radius: 10px;     box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12); }  .calendar-container header {     display: flex;     align-items: center;     padding: 25px 30px 10px;     justify-content: space-between; }  header .calendar-navigation {     display: flex; }  header .calendar-navigation span {     height: 38px;     width: 38px;     margin: 0 1px;     cursor: pointer;     text-align: center;     line-height: 38px;     border-radius: 50%;     user-select: none;     color: #aeabab;     font-size: 1.9rem; }  .calendar-navigation span:last-child {     margin-right: -10px; }  header .calendar-navigation span:hover {     background: #f2f2f2; }  header .calendar-current-date {     font-weight: 500;     font-size: 1.45rem; }  .calendar-body {     padding: 20px; }  .calendar-body ul {     list-style: none;     flex-wrap: wrap;     display: flex;     text-align: center; }  .calendar-body .calendar-dates {     margin-bottom: 20px; }  .calendar-body li {     width: calc(100% / 7);     font-size: 1.07rem;     color: #414141; }  .calendar-body .calendar-weekdays li {     cursor: default;     font-weight: 500; }  .calendar-body .calendar-dates li {     margin-top: 30px;     position: relative;     z-index: 1;     cursor: pointer; }  .calendar-dates li.inactive {     color: #aaa; }  .calendar-dates li.active {     color: #fff; }  .calendar-dates li::before {     position: absolute;     content: "";     z-index: -1;     top: 50%;     left: 50%;     width: 40px;     height: 40px;     border-radius: 50%;     transform: translate(-50%, -50%); }  .calendar-dates li.active::before {     background: #6332c5; }  .calendar-dates li:not(.active):hover::before {     background: #e4e1e1; } 
JavaScript
let date = new Date(); let year = date.getFullYear(); let month = date.getMonth();  const day = document.querySelector(".calendar-dates");  const currdate = document     .querySelector(".calendar-current-date");  const prenexIcons = document     .querySelectorAll(".calendar-navigation span");  // Array of month names const months = [     "January",     "February",     "March",     "April",     "May",     "June",     "July",     "August",     "September",     "October",     "November",     "December" ];  // Function to generate the calendar const manipulate = () => {      // Get the first day of the month     let dayone = new Date(year, month, 1).getDay();      // Get the last date of the month     let lastdate = new Date(year, month + 1, 0).getDate();      // Get the day of the last date of the month     let dayend = new Date(year, month, lastdate).getDay();      // Get the last date of the previous month     let monthlastdate = new Date(year, month, 0).getDate();      // Variable to store the generated calendar HTML     let lit = "";      // Loop to add the last dates of the previous month     for (let i = dayone; i > 0; i--) {         lit +=             `<li class="inactive">${monthlastdate - i + 1}</li>`;     }      // Loop to add the dates of the current month     for (let i = 1; i <= lastdate; i++) {          // Check if the current date is today         let isToday = i === date.getDate()             && month === new Date().getMonth()             && year === new Date().getFullYear()             ? "active"             : "";         lit += `<li class="${isToday}">${i}</li>`;     }      // Loop to add the first dates of the next month     for (let i = dayend; i < 6; i++) {         lit += `<li class="inactive">${i - dayend + 1}</li>`     }      // Update the text of the current date element      // with the formatted current month and year     currdate.innerText = `${months[month]} ${year}`;      // update the HTML of the dates element      // with the generated calendar     day.innerHTML = lit; }  manipulate();  // Attach a click event listener to each icon prenexIcons.forEach(icon => {      // When an icon is clicked     icon.addEventListener("click", () => {          // Check if the icon is "calendar-prev"         // or "calendar-next"         month = icon.id === "calendar-prev" ? month - 1 : month + 1;          // Check if the month is out of range         if (month < 0 || month > 11) {              // Set the date to the first day of the              // month with the new year             date = new Date(year, month, new Date().getDate());              // Set the year to the new year             year = date.getFullYear();              // Set the month to the new month             month = date.getMonth();         }          else {              // Set the date to the current date             date = new Date();         }          // Call the manipulate function to          // update the calendar display         manipulate();     }); }); 

Output:

a1
How to Design a Simple Calendar using JavaScript?

Next Article
Create an Analog Clock using HTML, CSS and JavaScript
author
gauravprajapat24012001
Improve
Article Tags :
  • JavaScript
  • Web Technologies
  • JavaScript-Projects

Similar Reads

    JS Projects: User Interface Components

    • Price Range Slider with Min-Max Input using HTML CSS and JavaScript
      In this article, we are going to implement Price Range Slider using HTML, CSS, & JavaScript. Here, The user can move the meter on a price range slider to choose the suitable price range. To choose the right price range, the user can use a slider or input the minimum and maximum price values. We
      5 min read

    • Create a Button Loading Animation in HTML CSS & JavaScript
      A "Button Loading Animation" in HTML, CSS, and JavaScript is a user interface element that temporarily transforms a button into a loading state with a spinner or animation to indicate ongoing processing or data retrieval, providing feedback to users during asynchronous tasks. Approach: HTML page wit
      2 min read

    • How to make a Toast Notification in HTML CSS and JavaScript ?
      A Toast Notification is a small, non-intrusive popup message that briefly appears on the screen to provide feedback or updates. It features 4 distinct toast types triggered by buttons: "Submit" for a green "Success" toast, each with unique CSS animations. JavaScript manages their display duration. T
      5 min read

    • Create a Pagination using HTML CSS and JavaScript
      In this article, we will create a working pagination using HTML, CSS, and JavaScript. Pagination, a widely employed user interface­ pattern, serves the purpose of dividing extensive­ data or content into more manageable­ portions. It allows users the ability to effortle­ssly navigate through numerou
      5 min read

    • How to create Popup Box using HTML CSS and JavaScript?
      Creating a popup box with HTML, CSS, and JavaScript improves user interaction on a website. A responsive popup appears when a button is clicked, featuring an HTML structure, CSS for styling, and JavaScript functions to manage visibility. ApproachCreate the Popup structure using HTML tags, Some tags
      3 min read

    • How to create multi step progress bar using Bootstrap ?
      In this article, we will create a multi-step progress bar using Bootstrap. In addition to Bootstrap, we will use jQuery for DOM manipulation. Progress bars are used to visualize the quantity of work that's been completed. The strength of the progress bar indicates the progress of the work. It is gen
      4 min read

    • How to make Animated Click Effect using HTML CSS and JavaScript ?
      In this article, we will see how to make an Animated Click Effect using HTML CSS, and JavaScript. We generally see animations on modern websites that are smooth and give users a good experience. Here, we will see when the user clicks on the button only then some animation would appear. The animation
      3 min read

    • Design a Letter Hover Effect using HTML CSS and JavaScript
      In this article, we will learn to implement the bouncing letter hover effect using simple HTML, CSS, and JavaScript. HTML is used to create the structure of the page, CSS is used to set the styling and JavaScript is used for animation. Approach to Create the Bouncing Letter Hover EffectHTML Code: To
      2 min read

    • Design a Nested Chat Comments using HTML CSS and JavaScript
      In this article, we will learn how to create Nested Comments using JavaScript. We must have seen it on social media like Facebook, Instagram, Youtube, Twitter, etc. We have seen the use of the nested comment in the comment section of these social sites. Approach: Create a folder nested-comments on y
      2 min read

    • Create OTP Input Field using HTML CSS and JavaScript
      We will build an OTP (One-Time Password) input box, which is commonly used on many websites. This interactive and engaging UI element allows users to enter their OTP conveniently and efficiently. We will walk through the step-by-step process of creating this functionality using HTML, CSS, and JavaSc
      3 min read

    • How to Align Social Media Icons Vertically on Left Side using HTML CSS & JavaScript?
      In this article, we will learn how to create vertically aligned social media icons on the left side of a webpage using HTML, CSS, and JavaScript. We will use HTML to create the basic structure, CSS for styling, and JavaScript for added functionality. PrerequisitesHTMLCSSJavaScriptApproachWe are usin
      4 min read

    • Create an Autoplay Carousel using HTML CSS and JavaScript
      An Autoplay Carousel is a dynamic UI element that automatically cycles through a series of images or content slides, providing a visually engaging way to display information. It enhances user experience by showcasing multiple items in a limited space without manual navigation. This can be implemente
      2 min read

    • How to create image slider using HTML CSS and JavaScript ?
      An image slide, or slideshow, is a dynamic display of images that automatically transitions from one to the next, often with animations. To create an image slide, use HTML to structure the images, CSS for styling and animations, and JavaScript to control the timing and transitions between images. Ap
      3 min read

    JS Projects: Calculators and Converters

    • Create Aspect Ratio Calculator using HTML CSS and JavaScript
      In this article, we are going to implement an aspect ratio calculator. An aspect ratio calculator proves to be a useful tool for individuals seeking to determine the proportions of images or videos based on their width and height. Our aspect ratio calculator has a live preview option that enables us
      5 min read

    • Age Calculator Design using HTML CSS and JavaScript
      In Age Calculator, we will take the date of birth as the date input and it prints the age from the current date (or specified date). We will create the structure of the Age Calculator using HTML and CSS, and JavaScript will add the functionality to calculate the age in years, months, and days. Appro
      3 min read

    • Create a Length Converter using HTML CSS and JavaScript
      In this article, we will learn how to create a length converter using HTML, CSS, and JavaScript. The Length Converter is an intuitive web-based application that eliminates the complexities associated with manual conversions. Its user-friendly interface allows users to input a numerical value and sel
      6 min read

    • Temperature Converter using HTML CSS and JavaScript
      In this article, we will see Temperature Conversion between Celsius, Fahrenheit & Kelvin using HTML CSS & JavaScript. The Temperature is generally measured in terms of unit degree., i.e. in degrees centigrade, in degrees, Fahrenheit & Kelvin. Celsius is a standard unit of temperature on
      3 min read

    • Design a Number System Converter in JavaScript
      A Number System Converter is one that can be used to convert a number from one type to another type namely Decimals, Binary, Octal, and Hexadecimal. In this article, we will demonstrate the making of a number system calculator using JavaScript. It will have the option to select the number type for i
      3 min read

    • Design a Tip Calculator using HTML, CSS and JavaScript
      The tip is the money given as a gift for good service, to the person who serves you in a restaurant. In this project, a simple tip calculator is made which takes the billing amount, type of service, and the number of persons as input. As per the three inputs, it generates a tip for the serving perso
      4 min read

    • Design a Loan Calculator using JavaScript
      The Loan Calculator can be used to calculate the monthly EMI of the loan by taking the total amount, months to repay, and the rate of interest. Formula Used:interest = (amount * (rate * 0.01))/months;total = ((amount/months) + interest);ApproachExtract values from HTML input elements (#amount, #rate
      2 min read

    • Design a BMI Calculator using JavaScript
      A BMI (Body Mass Index) Calculator measures body fat based on weight and height, providing a numerical value to categorize individuals as underweight, normal weight, overweight, or obese. It’s widely used to assess health risks and guide lifestyle or medical decisions. A BMI Calculator using JavaScr
      3 min read

    • Percentage calculator using HTML CSS and JavaScript
      The percentage calculator is useful for students, shopkeepers, and for solving basic mathematical problems related to percentages. In this article, we are going to learn, how to make a percentage calculator using HTML CSS, and JavaScript Formula used:What is X percent of Y is given by the formula: X
      3 min read

    • How to Create a Binary Calculator using HTML, CSS and JavaScript ?
      HTML or HyperText Markup Language along with CSS (Cascading Stylesheet) and JavaScript can be used to develop interactive user applications that can perform certain functionalities. Similarly, a binary calculator can be developed using HTML, CSS, and JS altogether. Binary Calculator performs arithme
      5 min read

    JS Projects: Games

    • Rock Paper and Scissor Game using JavaScript
      Rock, paper, and scissors game is a simple fun game in which both players have to make a rock, paper, or scissors. It has only two possible outcomes a draw or a win for one player and a loss for the other player. Prerequisites:HTMLCSSJavaScriptApproachStart by creating the HTML structure for your Ro
      5 min read

    • Simple Tic-Tac-Toe Game using JavaScript
      This is a simple and interactive Tic Tac Toe game built using HTML, CSS, and JavaScript. Players take turns to mark X and O on the grid, with automatic win detection and the option to reset or start a new game. What We’re Going to CreatePlayers take turns marking X and O on a 3x3 grid, with real-tim
      6 min read

    • Simple HTML CSS and JavaScript Game
      Tap-the-Geek is a simple game, in which the player has to tap the moving GeeksForGeeks logo as many times as possible to increase their score. It has three levels easy, medium, and hard. The speed of the circle will be increased from level easy to hard. I bet, it is very difficult for the players to
      4 min read

    • Design Hit the Mouse Game using HTML, CSS and Vanilla Javascript
      In this article, we are going to create a game in which a mouse comes out from the holes, and we hit the mouse with a hammer to gain points. It is designed using HTML, CSS & Vanilla JavaScript. HTML Code: First, we create an HTML file (index.html).Now, after creating the HTML file, we are going
      5 min read

    • Crack-The-Code Game using JavaScript
      It is quite easy to develop with some simple mathematics. A player has to guess the 3 numbers in order to win this game by using 5 simple hints. This is going to be a very interesting game. This game is built using simple mathematics in JavaScript. Prerequisites: Basic knowledge of some front-end te
      5 min read

    • Design Dragon's World Game using HTML CSS and JavaScript
      Project Introduction: "Dragon's World" is a game in which one dragon tries to save itself from the other dragon by jumping over the dragon which comes in its way. The score is updated when one dragon saves himself from the other dragon. The project will contain HTML, CSS and JavaScript files. The HT
      6 min read

    • Word Guessing Game using HTML CSS and JavaScript
      In this article, we will see how can we implement a word-guessing game with the help of HTML, CSS, and JavaScript.  Here, we have provided a hint key & corresponding total number of gaps/spaces depending upon the length of the word and accept only a single letter as an input for each time. If it
      4 min read

    • Word Scramble Game using JavaScript
      This article will demonstrate the creation of a Word Scramble Game using JavaScript. Word Scramble Game is a simple quiz game based on the rearrangement of letter to make a random word and the user have to guess the correct word out of it with the help of provided hint. If the user is able to guess
      3 min read

    JS Projects: Productivity Tools

    • How To Build Notes App Using Html CSS JavaScript ?
      In this article, we are going learn how to make a Notes App using HTML, CSS, and JavaScript. This project will help you to improve your practical knowledge in HTML, CSS, and JavaScript. In this notes app, we can save the notes as titles and descriptions in the local storage so the notes will stay th
      4 min read

    • Task Scheduler Using HTML, CSS and JS
      In this article, we will create a Task Scheduler web application using HTML, CSS and JavaScript. This is an application which can store tasks provided by user and classified them as low priority, middle priority, and high priority. User also can provide a deadline for the task. User also can mark do
      3 min read

    • Build an Expense Tracker with HTML CSS and JavaScript
      Managing personal finances is essential for maintaining a healthy financial life. One effective way to achieve this is by keeping track of expenses. In this article, we'll learn how to create a simple expense tracker using HTML, CSS, and JavaScript. By the end, you'll have a functional web applicati
      4 min read

    • Create a Sortable and Filterable Table using JavaScript
      In this article, we will demonstrate how to create a sortable and filtrable table using JavaScript. This custom table will have the functionality of editing or removing individual items along with sorting and filtering items according to different fields. Also, a form is attached so that the user ca
      6 min read

    • Dynamic Resume Creator using HTML CSS and JavaScript
      Creating a well-designed and professional resume can be a challenging and time-consuming task for job seekers. Many individuals struggle with formatting, organizing information, and ensuring their resume stands out among others. To address this problem, a Resume Creator project was developed to simp
      4 min read

    • Create a Quiz App with Timer using HTML CSS and JavaScript
      Creating a quiz app is an excellent way to learn the fundamentals of web development. In this tutorial, we will build a Quiz App that features a timer, allowing users to take a timed quiz with multiple-choice questions. The app will use HTML for the structure, CSS for styling, and JavaScript for fun
      8 min read

    • How to Create Stopwatch using HTML CSS and JavaScript ?
      In this article, we will learn How to create a Stopwatch using HTML CSS, and JavaScript. The StopWatch will have the Start, Stop, and Reset functionality. Prerequisites:HTML CSS JavaScriptApproach:Create one container in which all the elements are present.Inside this container add 2 divs that contai
      3 min read

    JS Projects: Data Management and Utilities

    • Create a Data Export and Import using HTML CSS and JavaScript
      In this article, we are going to implement a Data Export and Import Project using HTML CSS & JavaScript. The application we are going to create will allow the user to export their data to a CSV file effortlessly and then import data back from CSV files. Whether you're managing lists or working w
      3 min read

    • Employee Database Management System using HTML CSS and JavaScript
      In this article, we will be building an employee database management system using JavaScript. Employee Database Management System is the collection of Employees' data like names, first and last, email, contact numbers, salary and date of birth, etc. It provides an easy way to access and manage the l
      7 min read

    • Create a Prime Number Finder using HTML CSS and JavaScript
      In this article, we will see how to create a Prime Number Finder using HTML, CSS, and JavaScript. The main objective of this project is to allow users to input a number and check if it is a prime number or not. Prime numbers are those, that can only be divided by 1 and themselves. We'll develop a ba
      3 min read

    • Create an Anagram Checker App using HTML CSS and JavaScript
      In this article, we will see how to create a web application that can verify if two input words are Anagrams or not, along with understanding the basic implementation through the illustration. An Anagram refers to a word or phrase that's created by rearranging the letters of another word or phrase u
      3 min read

    • Anagram Count using HTML CSS and JavaScript
      In this article, we will create an Anagram Counting app using HTML, CSS, and JavaScript. Anagrams are the words of rearranged characters or letters in random order. These words contain the same letters. These rearranged words on sorting result in the same words with the same letters used.  Consider
      3 min read

    • Create a Password Strength Checker using HTML CSS and JavaScript
      This project aims to create a password strength checker using HTML, CSS, and JavaScript that is going to be responsible for checking the strength of a password for the user's understanding of their password strength by considering the length of the password which will be that the password should con
      3 min read

    • Build a Password Generator App with HTML CSS and JavaScript
      In this article, we will build a password generator application using HTML, CSS, and JavaScript. This application will generate strong and secure passwords based on user preferences, such as password length and character types. It aims to provide a convenient tool for users to generate random passwo
      3 min read

    • Create a Sortable and Filterable Table using JavaScript
      In this article, we will demonstrate how to create a sortable and filtrable table using JavaScript. This custom table will have the functionality of editing or removing individual items along with sorting and filtering items according to different fields. Also, a form is attached so that the user ca
      6 min read

    JS Projects: Web and Landing Pages

    • Create a Bookmark Landing Page using HTML CSS and JavaScript
      In this article, we are going to implement a Bookmark Landing Page using HTML, CSS, and JavaScript. Users can effortlessly add, manage, and remove bookmarks, resulting in a tidy digital library for their favorite websites. Bookmarking the Landing Page refers to a web page or website where the users
      5 min read

    • How to create a Landing page using HTML CSS and JavaScript ?
      A landing page, also referred to as a lead capture page, static page, or destination page, serves a specific purpose and typically appears as a result of online advertising or search engine optimization efforts. Unlike a homepage, a landing page is stripped of distractions and focuses on capturing v
      7 min read

    • How to make own Linktree using HTML, CSS and JavaScript ?
      Linktree is a tool that permits you to share multiple hyperlinks of various social media into one site. It gained popularity on Instagram, as Instagram does not allow you to share web links anywhere other than Stories and the 'bio' section of your profile page, which has a strict character limit. In
      5 min read

    • Create a Responsive Admin Dashboard using HTML CSS and JavaScript
      An Admin Panel typically has several sections that enable the administrator to manage and control various activities on a website. The layout usually consists of a header and a sidebarnavigation bar, which allows the admin to easily navigate between the various sections of the panel. In the header,
      9 min read

    JS Projects: Visualizers and Effects

    • Create a Stack Visualizer using HTML CSS and Javascript
      In this article, we will see how to create a stack visualizer using HTML, CSS & Javascript, along with understanding its implementation through the illustration. Stack is a well-known linear data structure that may follow the order LIFO(Last In First Out) or FILO(First In Last Out). There are ma
      9 min read

    • How to Design a Simple Calendar using JavaScript?
      We will Create a calendar using HTML, CSS, and JavaScript that displays the current month and year, and allows the user to navigate to previous and next months. Also, it allows the user to jump to a specific month and year. The calendar should also highlight the current date. Prerequisites: HTMLCSSJ
      5 min read

    • Create an Analog Clock using HTML, CSS and JavaScript
      Designing an analog clock is an excellent project to enhance your web development skills. This tutorial will guide you through creating a functional analog clock that displays the current time using HTML, CSS, and JavaScript. What We’re Going to CreateWe will develop a simple analog clock that shows
      5 min read

    • How to Design Digital Clock using JavaScript?
      Clocks are useful elements for any UI if used in a proper way. Clocks can be used on sites where time is the main concern like some booking sites or some apps showing arriving times of trains, buses, flights, etc. We will learn to make a digital clock using HTML, CSS, and JavaScript. ApproachCreate
      2 min read

    • How to Create Image Gallery using JavaScript?
      An Image Gallery is a collection of images displayed in a grid or slideshow format on a webpage. To create an Image Gallery using JavaScript, you can dynamically load images, create HTML elements, and use CSS for styling. JavaScript can add interactivity, like transitions and navigation controls. He
      3 min read

    • Creating a Simple Image Editor using JavaScript
      In this article, we will be creating a Simple Image Editor that can be used to adjust the image values like brightness, contrast, hue, saturation, grayscale, and sepia. Image editors allow one to quickly edit pictures after they have been captured for enhancing them or completely changing their look
      10 min read

    • How to randomly change image color using HTML CSS and JavaScript ?
      In this article, we will create a webpage where we can change image color randomly by clicking on the image using HTML, CSS, and JavaScript. The image color will change randomly using the JavaScript Math random() function. Approach: First of all select your image using HTML <img> tag.In JavaSc
      2 min read

    • Create your own Lorem ipsum using HTML CSS and JavaScript
      In this article, we are going to implement a Lorem Ipsum Generator Application through HTML, CSS, and JavaScript. Lorem Ipsum, a placeholder text commonly utilized in the printing and typesetting industry, serves to visually represent a document's layout instead of relying on meaningful content. Fin
      5 min read

    • Star Rating using HTML CSS and JavaScript
      Star rating is a way to give a rating to the content to show its quality or performance in different fields. This article will demonstrate how to create a star rating project using JavaScript. Output Preview:PrerequisitesHTMLCSSJavaScriptApproachCreate the basic structure using HTML entities, divs,
      3 min read

    • Design a Simple Counter Using HTML CSS and JavaScript
      Creating a counter application with click tracking is a great beginner-friendly project to enhance your understanding of JavaScript, HTML, and CSS. In this article, we will guide you through building a basic counter app where you can increment or decrement a value, track the number of clicks, and re
      4 min read

    • Design Background color changer using HTML CSS and JavaScript
      Background color changer is a project which enables to change the background color of web pages with ease. There are color boxes on a web page when the user clicks on any one of them, then the resultant color will appear in the background of the web page. It makes web pages look attractive. File str
      3 min read

    • How to create Expanding Cards using HTML, CSS and Javascript ?
      Creating expanding cards using HTML, CSS, and JavaScript involves creating a set of cards that expand when clicked. ApproachSelection of Sections:The code starts by selecting all HTML elements with the class 'section' using the document.querySelectorAll('.section') method.This creates a NodeList con
      2 min read

    • Design a Responsive Sliding Login & Registration Form using HTML CSS & JavaScript
      In this article, we will see how to create the Responsive Sliding Login & Registration Form using HTML CSS & JavaScript, along with understanding its implementation through the illustration. Many websites, nowadays, implement sliding login & registration forms for their sites. A Registra
      5 min read

    JS Projects: Search and API Integration

    • How to Create a GitHub Profile Search using HTML CSS and JavaScript ?
      In this article, we will be developing an interactive GitHub Profile Search application using HTML, CSS, and JavaScript Language. In this application, there is a search bar where users can enter the username that they want to view. After entering the username, an API call is been triggered, and the
      4 min read

    • Create a Wikipedia Search using HTML CSS and JavaScript
      In this article, we're going to create an application, for searching Wikipedia. Using HTML, CSS, and JavaScript, users will be able to search for articles on Wikipedia and view the results in a user interface. When the user inputs the search text into the textbox, the search result for the same will
      3 min read

    • How to create Sentence Translator using HTML, CSS, and JavaScript ?
      In this article, we are going to make a sentence translator app with the help of API using JavaScript. Basic setup: Open VS Code and open a folder from your drive where you want to create this project and give the name Translate-Sentence(folderName). After opening create the following files: index.h
      3 min read

    • Search Bar using HTML CSS and JavaScript
      Every website needs a search bar through which a user can search the content of their concern on that page. We're going to learn how to create one using only HTML, CSS, and JavaScript. Instead of getting into complex algorithms for finding related content, we'll focus on a basic task—searching for s
      3 min read

    JS Projects: Generators and Tools

    • How to create Hex color generator using HTML CSS and JavaScript?
      Hex color codes are six-digit combinations representing the amount of red, green, and blue (RGB) in a color. These codes are essential in web design and development for specifying colors in HTML and CSS. The hex color generator provides the hex code for any selected color, making it a valuable tool
      2 min read

    • Create a Emoji Generator Using HTML CSS & JavaScript
      While communicating with our friends, we always use the emoji to represent our feelings and emojis. There are many emojis that represent our emotions and feelings. As developers, we can generate a random emoji on every click of the button, and we can also copy that emoji and paste it into our chat b
      7 min read

    • Create an QR Code Generator Project using HTML CSS & JavaScript
      In today's digital world, QR codes are widely used and provide a practical way to share information and access content with a quick scan. This deeply manually operated will show you step-by-step how to create a QR code generator from scratch using HTML, CSS, and JavaScript. This article will give yo
      3 min read

    • Create a QR Code Scanner or Reader in HTML CSS & JavaScript
      In this article, we will see how we can implement a QR Code Scanner with the help of HTML CSS & JavaScript. A QR code scanner will provide the user with two options to scan the QR code either by uploading the image file of the URL to be scanned or by using the camera of your system to scan the Q
      3 min read

    • Create a Coin Flip using HTML, CSS & JavaScript
      We will display the styled INR coin to the user and there will be a styled button (Toss Coin). We will create the entire application structure using HTML and style the application with CSS classes and properties. Here, JavaScript will be used to manage the behavior of the Coin Flip and will be used
      4 min read

    • Create a Resize and Compress Images in HTML CSS & JavaScript
      While using the GeeksforGeeks Write Portal to write articles, we need to upload the images. As we need to resize the image as per GeeksforGeeks's requirement, we search for different tools and websites on the internet to resize and compress the image. But, as a web developer, we can create our own i
      7 min read

    JS Projects: Miscellaneous

    • Build a Spy Number Checker using HTML CSS and JavaScript
      In the realm of mathematics, Spy Numbers, also known as secretive numbers or cryptic numbers, possess a unique property. A spy number is defined as a number whose sum of digits is equal to the product of its digits. In this article, we will explore how to build a Spy Number Checker using HTML, CSS,
      3 min read

    • How to create Pay Role Management Webpage using HTML CSS JavaScript ?
      In this article, we are going to make a Pay Role Management webpage with Javascript. In this project, we are going to learn and clear the concepts of basic javascript. Prerequisites: The pre-requisites for this project are- ES6 JavaScriptQuery SelectorsApproach: To create our Pay Role Management web
      6 min read

    • How to make curved active tab in navigation menu using HTML CSS & JavaScript ?
      In this article, we will learn about the curved outside in the active tab used in the navigation menu using HTML, CSS & JavaScript. One of the most beautiful and good-looking designs of a navigation menu is the 'Curve outside in Active Tab' design. With the help of the CSS border-radius property
      6 min read

    • Implement Dark Mode in Websites Using HTML CSS & JavaScript
      Dark and light modes let users switch between a dark background with light text and a light background with dark text, making websites more comfortable and accessible based on their preferences or surroundings. What We’re Going to CreateA button allows users to switch between dark and light themes d
      5 min read

    • How to make Incremental and Decremental counter using HTML, CSS and JavaScript ?
      While visiting different shopping websites like Flipkart and Amazon you have seen a counter on each product, that counter is used to specify the quantity of that product. Hence, the counter is a very useful part of many websites. In this article, we will design a counter using HTML, CSS, and JavaScr
      2 min read

    • How to preview Image on click in Gallery View using HTML, CSS and JavaScript ?
      In this article, we see how easily we can create an Image Gallery with a preview feature using HTML, CSS, and some JavaScript. ApproachCreate a div with a class container.Create two more div inside the first div one for the main view and the other for the side view with classes main_view and side_vi
      2 min read

    • Multiplication Quiz Webapp using HTML CSS and JavaScript
      In this article, we will see how to create a multiplication quiz web app using HTML, CSS, and JavaScript. Description of Web App: In this web app, random questions come one by one based on basic multiplication. If you give a correct answer, then it will increment by +1, and if you give the wrong ans
      3 min read

    • Design a Student Grade Calculator using JavaScript
      A Student Grade Calculator is a tool used to compute students' grades based on their scores in various assessments, such as assignments, quizzes, exams, or projects. It helps standardize grading, ensures accuracy, and provides students with a clear understanding of their academic performance. Formul
      4 min read

    • Word and Character Counter using HTML CSS and JavaScript
      Word and Character Counter is a web application used to count words and characters in a textarea field. HTML, CSS, and JavaScript is used to design the Word and Character Counter. In the textarea field, the user can write anything and this application shows how many words are added by the user and h
      4 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences