Make a Digital Clock with Date using JavaScript

Make a Digital Clock with Date using JavaScript

In this article, you will learn how to create Digital Clock with Date using JavaScript. Earlier I shared with you many more types of digital and analog clocks designs. This digital watch is made with a Glassmorphism design

Glassmorphism design is a very popular CSS effect that adds extraordinary beauty to any project. We all use digital watches. Making digital clocks from analog clocks is much easier. The time shown here will be taken from the device i.e. the time that will be on your device will be shown here. This time JavaScript’s newDate method is used to receive.

I fully explained how I took the time from the device to show in this project. There is no reason to worry if you are a beginner. Here I have shared step-by-step tutorials and given possible explanations of each line. As I said before you will see the date with this JavaScript digital clock. That means both time and date can be seen.

If you want to make this digital clock, you must have a basic idea about JavaScript HTML, and CSS. Below I have given a complete step-by-step tutorial on how I created this JavaScript Digital Clock with Date. As I said before it is made with the help of Glassmorphism design. In the case of Glassmorphism design, the background is somewhat transparent, meaning that the content in the background can be seen.

Digital Clock with Date using JavaScript

First, we created two colorful circles on the webpage. Here the background of the project(Digital Clock with Date using JavaScript) is almost transparent so the two colorful circles behind it can be seen somewhat clearly. First, a box was created to show the time here.

 Then I made another small box where the date will be shown. Arrangements have been made here to show the month, day, and year between the dates.

See the Pen
Untitled
by Raj Template (@RajTemplate)
on CodePen.

Hopefully, the demo above has helped you to know how it works. Above you will find the required source code. However, you can download the source code with the help of the button below the article.

First, we created two colorful circles using HTML and CSS. Then I made the basic design. After all, using JavaScript takes time from the device to make it work.

Step 1: Create two colorful circles

We have created two colorful circles on the webpage using the following HTML and CSS codes. I have created an area to see these. Those two circles can be seen in that area. 

<div class=”background”>
   <div class=”shape”></div>
   <div class=”shape”></div>
</div>
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: border-box;
  outline: none;
}
body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
    background-color: #080710;
  height: 100vh;
}
webpage

The width of that area: 430px and height: 520px. Here the height of the circles, the width 140px, and the border-radius helped to convert it into a circle.

.background{
    width: 430px;
    height: 520px;
    position: absolute;
    transform: translate(-50%,-50%);
    left: 50%;
    top: 50%;
}
.background .shape{
    height: 140px;
    width: 140px;
    position: absolute;
    border-radius: 50%;
}

 

 The following codes have been used to locate that circle. Different positions and background colors have been added for the two circles.

.shape:first-child{
    background: linear-gradient(
        #1845ad,
        #23a2f6
    );
    left: -80px;
    top: 70px;
}
.shape:last-child{
    background: linear-gradient(
        to right,
        #ff512f,
        #f09819
    );
    right: -80px;
    bottom: 80px;
}
Create two colorful circles

Step 2: HTML code to create a digital clock (more…)

Continue ReadingMake a Digital Clock with Date using JavaScript

3D Cube Image Slider using HTML & CSS (2023 Update)

3D Cube Image Slider using HTML & CSS

Image Slider You may have seen a lot but this 3D Cube Image Slider will attract you a lot more. This CSS 3D Cube Image Slider is in the shape of a cube around which the image can be seen.

 It continues to rotate at a 360-degree angle along the Axis. As a result, every now and then we see each image. Four images have been used on each side of the cube. This slider will take 16 seconds to rotate 360 ​​along the x-axis.

CSS 3D Image Slider

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

We can see each side of the cube for four seconds. Earlier I shared with you the design of many more types of 3D Cube Image Slider. Some of these are image slider manuals and some are automatic.

Step 1: Image slider’s background 

I have created the background of this 3D image slider with the help of HTML and CSS code below. Since it is cute, both width and height are equal. Here width and height 240px is used and background blue is used.

<div id = “cube-container”>
</div>
#cube-container {
    width: 240px;
    height: 240px;
    margin: 80px auto;
    perspective: 800px;
    background: blue;
}
Image slider's background

Step 2: Add images to the 3D slider (more…)

Continue Reading3D Cube Image Slider using HTML & CSS (2023 Update)

Save Textarea Text to a File using JavaScript

Save Textarea Text to a File using JavaScript

In this article, you will learn how to convert Textarea Text to File using JavaScript. This is a great project for beginners. There is a box here, you can convert the contents of that box into a file. Many times in a project you need to save the text content to the file later. In that case, you can use this JavaScript Create and Save text file project.

 We usually use Notepad when we want to create any kind of files like HTML, CSS, or text. This project will make that task much easier. There is a small box in which you can input some text or information. 

Then there is another small box where you can use the rename of your choice. Then there is a download button that will save the file by clicking on it.

Save Text to a File in JavaScript

I used JavaScript, HTML, and CSS to create this project. First, we created its basic structure using HTML CSS. Then I implemented this project (Create and Save the text file in JavaScript) using JavaScript.

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

First I designed the webpage and made a box on it. I added a heading at the beginning of this box. The h1 tag has been used to enhance this heading. Then I created a box using HTML’s Textarea. In this box, you can input some text. Then create another input box in which you can add the rename of the file of your choice. Here you can create any type of file.

 If you open this Create and save a file project with a browser, your content will be downloaded automatically. If you open it using a code editor, you will be asked for permission to download the file.

How to save textbox value to file using JavaScript

To build it you need to have a basic idea about HTML CSS and JavaScript. The video below will help you learn how it works.

You can also use the demo section above to know How to save form data in a Text file using JavaScript. If you just want the source code, you can use the download button at the bottom of the article. However, I request you to follow the step-by-step tutorials below. 

Below I have shown step-by-step how to save text to a client-side file using JavaScript. Hereafter each step I have given possible results which will help you to understand better.

Step 1: Basic structure of Text to a File project

I have created the basics of this project (Create and Save the text file in JavaScript) using the following HTML and CSS code. 

A box has been created here with width: 430px and the background color is white. Here I have used the background-color blue of the webpage.

<div id=”container”>
 
</div>
* {
  box-sizing: border-box;
}
body {
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #044b82;
  font-family: “Kanit”, Verdana, Arial, sans-serif;
}
#container {
  width: 430px;
  padding: 40px 20px;
  background: white;
}
Basic structure of Text to a File project

Step 2: Add a heading using HTML (more…)

Continue ReadingSave Textarea Text to a File using JavaScript

Responsive Footer Design using HTML & CSS

Responsive Footer Design using HTML & CSS

In this article, you will learn how to create a Responsive Footer Design using HTML and CSS. Earlier I shared many more types of HTML footer tutorials with you. Footer is one of the most important parts of any website. The beauty of a website depends a lot on the footer design.

There are many types of Responsive Footer. Some websites use a simple footer that contains some basic information and some links. Some websites use modern footer designs which include many types of information, links, social icons, subscribe forms, etc.

It is made fully responsive so that it can be easily used on any device. CSS’s Flexbox has been used to make it responsive. With the help of Flexbox, no separate CSS code had to be added to make it responsive.

Responsive Footer using HTML and CSS

To create this project (simple responsive footer HTML CSS) you need to have a basic idea about HTML and CSS. Below I have shared step-by-step tutorials and provided the necessary source code.

 If you only want the source code, you can use the download button at the bottom of the article.

Step 1: The basic structure of footer design

The basic structure of this footer design has been created using the following HTML and CSS codes. This structure will contain all the information such as text, social icons, links, newsletters, etc.

<footer>
  <div class=”row primary”>
 
  </div>
</footer>

Background-color light black is used here. Here width: 100% and min-height: 100px are used. Its height will depend on the amount of content. 

body {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
}
footer {
  background-color: #121315;
  color: #a7a7a7;
  font-size: 16px;
min-height:100px;
width:100%;
}
footer * {
  font-family: “Poppins”, sans-serif;
  box-sizing: border-box;
  border: none;
  outline: none;
}

This footer area is divided into 4 columns using the following CSS codes. We call this column sharing method Flexbox.

.row {
  padding: 1em 1em;
}
.row.primary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  align-items: stretch;
}
The basic structure of footer design

Step 2: Add information to Responsive Footer Design (more…)

Continue ReadingResponsive Footer Design using HTML & CSS

Height Converter App using JavaScript – Free Source Code

Height Converter App using JavaScript

In this article, you will learn how to create a Height Converter App using JavaScript. JavaScript Height Converter will help to convert the number of feet and inches to cm.

Here, if you input your height in feet and inches, you can see how many cm it will be. This is a simple JavaScript project that will help you learn the basics of JavaScript. I have created many more types of JavaScript projects before. Like the others, I hope you enjoy this project.

There are two inputs here. The first can be input in feet and the second in inches. It also has a display in which all the calculations can be seen. I took the help of HTML CSS and JavaScript to make this Height Converter App. HTML has designed the basics of CSS and JavaScript has made it work.

JavaScript Height Converter App

Below is a step-by-step tutorial on how I created this Height Converter project. First I made a box in which I put all the information. I have given a heading on the top of the box which will basically help to enhance the beauty. Then there is a display in which the calculated results can be seen.

 Below are two input spaces. There is a button at the end of all the clicks on which the calculation can be seen in the display.

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

First, you create an HTML and CSS file then follow the tutorials below. Above I have given a demo which will help you to know how it works.

Step 1: Basic structure of Height Converter

We have created the basic structure of this height converter application using the following HTML and CSS code. This structure is basically a box containing all the information.

The background color of the web page is blue and the background color of the box is white. Box width: 450px and height: 530px.

<form action=”” id=”calculator”>
</form>
body{
    background: #076fde;
    font-family: sans-serif;
}
form{
    margin: 50px auto;
    width: 450px;
    height: 530px;
    background-color: white;
}
Basic structure of Height Converter

Step 2: Add a heading

Now a heading has been used in this box. This will basically help to enhance the beauty. The background color of the heading is blue and the text color is white. Font-size: 28px helped to increase the size a bit.

<h1>Height Converter</h1>
h1{
    text-align: center;
    color: white;
    background: #033d67;
    font-size: 28px;
    padding: 5px;
}
Add a heading

Step 3: Create a display

Now we have created a display in which calculations can be seen. All the calculations can be seen in this display when you add the information in the input box. Display width: 80%, height: 100px and box-shadow are used to understand the size.

<div id=”results”></div>
#results{
    color: #064999;
    text-align: center;
    width: 80%;
    height: 100px;
    margin: 10% auto;
    box-shadow: 0 0 20px rgba(0,139,253,0.3);
    font-size: 2.5em;
}
Create a display

Step 4: Create a box to input the height (more…)

Continue ReadingHeight Converter App using JavaScript – Free Source Code

Simple Weather App using JavaScript – Free Source Code

JavaScript Weather App

In this article, you will learn how to create a Simple Weather App using HTML CSS, and JavaScript. JavaScript Weather App is a great project that helps to find out the weather of any location.

In this project made here, you will be able to know the temperature, wind speed, sky condition, etc. First I created a box that contains an input box. If you input the name of any city in the input box, you will get all the information.

You will see all the information in another box. With the help of this simple weather application, you can easily know the weather of any city in the world. This design can be easily made with the help of Jquery. However, if you want, you can easily create this application using pure JavaScript.

No doubt you need to have a basic idea about JavaScript. If you know Basic JS then you can make it very easy. Because for beginners I have given a complete step-by-step explanation of why I used that code line.

JavaScript Weather App

 Below is a live demo that will help you learn how this project (JavaScript Weather App) works. Here, after you input the name of any city, click on the submit button below, all the information can be seen in the box below. I have shown in the following tutorial how you can increase the amount of information if you want.

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

Hopefully, the demo above has helped you to know how it works (how to make a weather app in HTML). You will find the source code required to create it in the demo box above. There is also a download button at the bottom of the article.

How to Build a Weather App JavaScript

Below is a step-by-step tutorial on how to build this application in this weather. First of all, I created a box using some amount of HTML. Then I created a box to input using the input function of HTML. 

In this input box, you can input the name of any city. Then I have created the submit button which can be clicked to see all the information. All the information shown here will be collected with the help of the API link.

The information will be collected first with the help of the JavaScript fetch method. Then with the help of innerHTML all those information has been arranged to be displayed on the web page. First I arranged to show a small heading in the information box. Where you can find the name of the city you searched for. 

Then all the other information in the box like sky condition, temperature, wind speed, etc. can be seen. First, you create an HTML CSS file. Then follow the step-by-step tutorial below. I have shared a video for your needs which will help you to know better.

Step 1: Basic structure of the Weather App

The basic structure of this Weather App has been created using the following HTML and CSS code. This structure will contain all the information. The width of this area: 410px and margin: 50px auto has been used to keep it in the middle.

<div class=”container-fluid”>
  <section class=”main”>
  </section>
</div>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    background: #448aff;
}
.container-fluid{
 width: 410px;
 margin: 50px auto;
 padding: 10px;
}

Step 2: Create a place to input the city name (more…)

Continue ReadingSimple Weather App using JavaScript – Free Source Code

How to Create Stopwatch using HTML CSS JavaScript

JavaScript Stopwatch

Here, You will learn how to create a Stopwatch using JavaScript. JavaScript Stopwatch is a great project that will help beginners to learn more about JavaScript.

Earlier I shared with you how to make a simple stopwatch. We use a stopwatch for various purposes. Which helps us to run the countdown for a certain period of time. But there is a difference between a countdown timer and a stopwatch. 

The countdown timer cannot be turned off when you wish. However, you can turn this stopwatch on and off whenever you want. 

JavaScript Stopwatch

Here’s the basic structure I made a box and made three small displays in it. Counted time can be seen in this display. There are also two buttons that will help turn the stopwatch on and off.

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

Hopefully, the demo above has helped you to get a live preview of the javascript time stopwatch. You will find the source code required for making this simple javascript stopwatch at the bottom of the article. However, there are many beginners who do not understand the code. I have shared step-by-step tutorials for them.

However, there is a problem with this design, you can not restart here. Because I made it so easy. You can see this design if you want to add a restart button.

How to Create a Stopwatch in JavaScript

Below I have shared a step-by-step tutorial on how to create this JavaScript Stopwatch. For this, you need to have a basic idea about HTML CSS, and JavaScript. First of all, HTML CSS has helped to create its basic structure.

Step 1: Basic structure of stopwatch

I have created a box using the following HTML and CSS code. I will add all the information to this box. The width of this box: 300px and height: 90px have been used. 

Here the background color I used is white and it helped margin: 100px auto to place it in the middle of the webpage.

<div id=”stopwatch”>
</div>
body {
  font-family: arial;
  background: #0776de;
}
#stopwatch {
  width: 300px;
  height: 90px;
  margin: 100px auto;
  background: white;
  color: #333;
  border-radius: 10px;
  padding: 60px 50px 100px;
  text-align: center;
  font-size: 30px;
}
Basic structure of stopwatch

Step 2: 3 countdown viewing boxes (more…)

Continue ReadingHow to Create Stopwatch using HTML CSS JavaScript

Gradient Color Generator using JavaScript (Free Code)

Gradient Color Generator using JavaScript

In this article, you will learn how to create a Gradient Color Generator using JavaScript. JavaScript Gradient Color Generator is a great project for beginners. If you know basic JavaScript, you can easily create such a project. 

We use linear-gradient colors for various purposes. However, it is not always possible to create the perfect color. So this type of project will help you to create beautiful gradients by easily combining different colors with different angles.

With it, you will get all the color codes that you can add directly to the CSS file. Earlier I showed how to make different types of random color generators. But here you can add the color of your choice.

JavaScript Gradient Color Generator

First I made a box at the top of the web page then I made a display. Colors can be seen in its display. Whenever you create a gradient using two colors, that color can be seen in the display. Then I made a box in which the color code can be found.

 Then I created two color input spaces. For this, I have used the input function of HTML. If you know basic HTML then you must know that there are different types of inputs. Color is a kind of input function like password, email, text, file, etc. I have created a space to input two colors here. I have made a select box next to it where there are many angles. 

Below I have shared a step-by-step tutorial on how to create this linear gradient Color Generator. For this, you need to have an idea about basic HTML CSS and JavaScript. HTML CSS has helped to create its basic structure. JavaScript has helped to make it fully functional.

 When you input the color of your choice between the two-color input spaces. Then the colors can be seen in the display by connecting them with each other. You can select the angle of your choice using this select box. According to which angle the two colors will be connected to each other to make Gradient Color.

See the Pen
Untitled
by Code Media (@codemediaweb)
on CodePen.

You can see the color code in the box. You can copy that code and add it directly to your CSS file.
Hopefully, the demo above has helped you get a live preview of this gradient generator javascript.

How to Make a Color Gradient in Javascript 

We’ve shared a video with the live demo that will help you understand the whole step-by-step.  First, you create an HTML and CSS file.

 Below the article, I have given the source code which you can download directly. But if you are a beginner, you must follow the step-by-step tutorial below.

Step 1: Basic structure of Gradient Generator

We have created the basic structure for creating Gradient generators using this code. The basic structure is a box that contains all the information such as color input, display, and color code.

<div class=”random-color”>
</div>
html {
  height: 100%;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-repeat:no-repeat;
}
body {
  color: #035aab;
  text-align: center;
}

Box width: 350px and height: 400px have been used. I have added box-shadow to enhance its beauty.

.random-color{
  width: 350px;
  box-shadow: 0 0 20px rgba(0,139,253,0.25);
  margin: 50px auto;
  padding: 20px; 
  height: 400px;
}
Make a box as its basic structure

Step 2: Display for Gradient Color viewing (more…)

Continue ReadingGradient Color Generator using JavaScript (Free Code)