Simple Calculator using HTML,CSS and JAVASCRIPT
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Simple Calculator</title>
<link rel="stylesheet" href="./[Link]">
</head>
<body>
<h1>Simple Calculator using html, css & js </h1>
<div class="calculator">
<input type="text" id="display" disabled>
<button onclick="clearDisplay()">C</button>
<button onclick="appendToDisplay('7')">7</button>
<button onclick="appendToDisplay('8')">8</button>
<button onclick="appendToDisplay('9')">9</button>
<button onclick="appendToDisplay('/')">/</button>
<button onclick="appendToDisplay('4')">4</button>
<button onclick="appendToDisplay('5')">5</button>
<button onclick="appendToDisplay('6')">6</button>
<button onclick="appendToDisplay('*')">*</button>
<button onclick="appendToDisplay('1')">1</button>
<button onclick="appendToDisplay('2')">2</button>
<button onclick="appendToDisplay('3')">3</button>
<button onclick="appendToDisplay('-')">-</button>
<button onclick="appendToDisplay('0')">0</button>
<button onclick="appendToDisplay('.')">.</button>
<button onclick="calculate()">=</button>
<button onclick="appendToDisplay('+')">+</button>
</div>
<script src="./[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
.calculator {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 10px;
max-width: 300px;
input {
grid-column: span 4;
padding: 10px;
font-size: 20px;
button {
padding: 10px;
font-size: 20px;
cursor: pointer;
background-color: #f1f1f1;
border: 1px solid #ccc;
button:hover {
background-color: #ddd;
JAVASCRIPT:
let display = [Link]('display');
function appendToDisplay(value) {
[Link] += value;
function calculate() {
try {
[Link] = eval([Link]);
} catch (error) {
[Link] = 'Error';
function clearDisplay() {
[Link] = '';
OUTPUT:
E-mail validation using HTML, CSS and JAVA SCRIPT
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Email Validation</title>
<link rel="stylesheet" href="./[Link]">
</head>
<body>
<div class="container">
<h1>Email Validation using Html,Css & Js</h1>
<form id="emailForm" onsubmit="return validateEmail()">
<input type="email" id="emailInput" placeholder="Enter your email address" required>
<button type="submit">Submit</button>
<p id="errorText"></p>
</form>
</div>
<script src="./[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
margin: 0;
padding: 0;
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ddd;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
h1 {
text-align: center;
input[type="email"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ddd;
button {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
cursor: pointer;
p#errorText {
color: red;
text-align: center;
margin-top: 10px;
JAVASCRIPT:
function validateEmail() {
const emailInput = [Link]('emailInput');
const errorText = [Link]('errorText');
const email = [Link]();
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if () {
[Link] = 'Please enter a valid email address.';
return false;
// If email is valid, clear the error message and submit the form
[Link] = '';
return true;
OUTPUT:
Temperature Conversion using HTML, CSS and JAVA SCRIPT
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Temperature Converter</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<div class="container">
<h1>Temperature Converter</h1>
<div class="input-container">
<label for="celsius">Celsius:</label>
<input type="number" id="celsius" placeholder="Enter temperature in Celsius">
</div>
<div class="input-container">
<label for="fahrenheit">Fahrenheit:</label>
<input type="number" id="fahrenheit" placeholder="Enter temperature in Fahrenheit">
</div>
<button id="convertBtn">Convert</button>
<div class="result" id="result"></div>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
.container {
max-width: 500px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
text-align: center;
.input-container {
margin-bottom: 10px;
label {
display: inline-block;
width: 120px;
text-align: left;
input {
width: 80%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
.result {
margin-top: 20px;
font-weight: bold;
JAVASCRIPT:
const celsiusInput = [Link]('celsius');
const fahrenheitInput = [Link]('fahrenheit');
const convertBtn = [Link]('convertBtn');
const resultDiv = [Link]('result');
[Link]('click', () => {
if ([Link] !== '') {
const celsius = parseFloat([Link]);
const fahrenheit = (celsius * 9/5) + 32;
[Link] = [Link](2);
[Link] = `${celsius}°C is ${[Link](2)}°F`;
} else if ([Link] !== '') {
const fahrenheit = parseFloat([Link]);
const celsius = (fahrenheit - 32) * 5/9;
[Link] = [Link](2);
[Link] = `${fahrenheit}°F is ${[Link](2)}°C`;
} else {
[Link] = "Please enter a temperature.";
});
OUTPUT:
Button Loading Animation using HTML, CSS and JAVASCRIPT
HTML:
<!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="[Link]">
<title>Button Loading Animation</title>
</head>
<body>
<button id="loading-btn" class="btn">Click me</button>
<script src="[Link]"></script>
</body>
</html>
CSS:
.btn {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
.[Link] {
background-color: #ccc;
cursor: not-allowed;
}
JAVASCRIPT:
const button = [Link]('loading-btn');
[Link]('click', () => {
[Link]('loading');
[Link] = 'Loading...';
// Simulate a task delay (e.g., fetching data)
setTimeout(() => {
[Link]('loading');
[Link] = 'Click me';
}, 2000); // Change this delay as needed
});
OUTPUT:
Stop Watch Monitoring using HTML, CSS and JAVASCRIPT
PROGRAM:
<!DOCTYPE html>
<html>
<head>
<style>
.stopwatch {
font-size: 2em;
margin: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="stopwatch" id="stopwatch">00:00:00</div>
<button onclick="startStopwatch()">Start</button>
<button onclick="stopStopwatch()">Stop</button>
<button onclick="resetStopwatch()">Reset</button>
<script>
let startTime;
let intervalId;
function startStopwatch() {
startTime = [Link]() - (startTime ? startTime : 0);
intervalId = setInterval(updateStopwatch, 1000);
}
function stopStopwatch() {
clearInterval(intervalId);
}
function resetStopwatch() {
clearInterval(intervalId);
startTime = null;
[Link]('stopwatch').textContent = '00:00:00';
}
function updateStopwatch() {
const elapsedTime = [Link]() - startTime;
const hours = [Link](elapsedTime / 3600000);
const minutes = [Link]((elapsedTime % 3600000) / 60000);
const seconds = [Link]((elapsedTime % 60000) / 1000);
const hoursStr = [Link]().padStart(2, '0');
const minutesStr = [Link]().padStart(2, '0');
const secondsStr = [Link]().padStart(2, '0');
[Link]('stopwatch').textContent = `${hoursStr}:${minutesStr}:$
{secondsStr}`;
}
</script>
</body>
</html>
OUTPUT:
START
STOP
Password strength Checker using HTML, CSS and JAVASCRIPT
HTML:
<!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="[Link]">
<title>Password Strength Checker</title>
</head>
<body>
<div class="container">
<h1>Password Strength Checker</h1>
<input type="password" id="password" placeholder="Enter your password">
<div id="strength-indicator"></div>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
.container {
text-align: center;
background-color: #fff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
input[type="password"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
#strength-indicator {
margin-top: 10px;
JAVASCRIPT:
const passwordInput = [Link]('password');
const strengthIndicator = [Link]('strength-indicator');
[Link]('input', updatePasswordStrength);
function updatePasswordStrength() {
const password = [Link];
const strength = calculatePasswordStrength(password);
const strengthText = getStrengthText(strength);
[Link] = strengthText;
[Link] = getColorForStrength(strength);
function calculatePasswordStrength(password) {
// You can implement your own password strength calculation logic here
// For simplicity, let's just count the characters for this example
const minLength = 6;
const maxLength = 10;
const length = [Link];
if (length < minLength) return 0;
if (length >= minLength && length <= maxLength) return 1;
return 2;
function getStrengthText(strength) {
const strengthTexts = ['Weak', 'Medium', 'Strong'];
return strengthTexts[strength];
function getColorForStrength(strength) {
const colors = ['#FF5733', '#FFC300', '#4CAF50'];
return colors[strength];
OUTPUT:
To-do list using HTML, CSS and JAVASCRIPT
HTML:
<!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="[Link]">
<title>To-Do List</title>
</head>
<body>
<div class="todo-container">
<h1>To-Do List</h1>
<input type="text" id="task" placeholder="Enter a task...">
<button id="addTask">Add Task</button>
<ul id="taskList"></ul>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
.todo-container {
max-width: 400px;
margin: 50px auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
h1 {
text-align: center;
input[type="text"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
button {
display: block;
width: 100%;
padding: 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
button:hover {
background-color: #0056b3;
ul {
list-style-type: none;
padding: 0;
}
li {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f9f9f9;
padding: 10px;
margin-bottom: 5px;
border-radius: 3px;
.delete-button {
background-color: #ff4136;
color: #fff;
border: none;
border-radius: 3px;
padding: 5px 10px;
cursor: pointer;
JAVASCRIPT:
const addTaskButton = [Link]('addTask');
const taskInput = [Link]('task');
const taskList = [Link]('taskList');
[Link]('click', addTask);
function addTask() {
const taskText = [Link];
if ([Link]() !== '') {
const listItem = [Link]('li');
[Link] = `
<span>${taskText}</span>
<button class="delete-button">Delete</button>
[Link](listItem);
[Link] = '';
const deleteButton = [Link]('.delete-button');
[Link]('click', () => {
[Link](listItem);
});
OUTPUT:
Palindrome Checker using HTML,CSS and JAVASCRIPT
HTML:
<!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="[Link]">
<title>Palindrome Checker</title>
</head>
<body>
<div class="container">
<h1>Palindrome Checker</h1>
<input type="text" id="inputText" placeholder="Enter a word or phrase">
<button onclick="checkPalindrome()">Check</button>
<p id="result"></p>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
.container {
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
h1 {
font-size: 24px;
margin-bottom: 10px;
}
input {
padding: 10px;
width: 100%;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 10px;
button {
padding: 10px 20px;
background-color: #007bff;
color: #ffffff;
border: none;
border-radius: 5px;
cursor: pointer;
button:hover {
background-color: #0056b3;
JAVASCRIPT:
function checkPalindrome() {
const inputText = [Link]("inputText").[Link]().replace(/\
s/g, "");
const reversedText = [Link]("").reverse().join("");
if (inputText === reversedText) {
[Link]("result").textContent = "It's a palindrome!";
} else {
[Link]("result").textContent = "It's not a palindrome.";
}
OUTPUT:
Item Selector using HTML,CSS and JavaScript
HTML:
<!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="[Link]">
<title>Item Selector</title>
</head>
<body>
<div class="dropdown">
<button class="dropdown-btn">Select an Item</button>
<ul class="dropdown-list">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-btn {
padding: 10px 20px;
background-color: #3498db;
color: #fff;
border: none;
cursor: pointer;
}
.dropdown-list {
display: none;
position: absolute;
list-style: none;
margin: 0;
padding: 0;
background-color: #f1f1f1;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.dropdown-list li {
padding: 10px;
border-bottom: 1px solid #ccc;
cursor: pointer;
}
.dropdown-list li:last-child {
border-bottom: none;
}
JAVASCRIPT:
[Link]('DOMContentLoaded', function() {
const dropdownBtn = [Link]('.dropdown-btn');
const dropdownList = [Link]('.dropdown-list');
[Link]('click', function() {
[Link] = [Link] === 'block' ? 'none' : 'block';
});
[Link]('click', function(event) {
if ([Link] === 'LI') {
[Link] = [Link];
[Link] = 'none';
}
});
[Link]('click', function(event) {
if () {
[Link] = 'none';
}
});
});
OUTPUT:
Traffic signal creation using HTML,CSS and JAVASCRIPT
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Traffic Signal Simulation</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<div class="traffic-signal">
<div class="light red"></div>
<div class="light yellow"></div>
<div class="light green"></div>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.traffic-signal {
display: flex;
flex-direction: column;
align-items: center;
background-color: #333;
padding: 10px;
border-radius: 8px;
}
.light {
width: 80px;
height: 80px;
border-radius: 50%;
margin: 5px;
transition: background-color 0.3s;
}
.red {
background-color: red;
}
.yellow {
background-color: yellow;
}
.green {
background-color: green;
}
JAVASCRIPT:
const redLight = [Link]('.red');
const yellowLight = [Link]('.yellow');
const greenLight = [Link]('.green');
function switchLights() {
setTimeout(() => {
[Link] = 'red';
[Link] = 'gray';
[Link] = 'gray';
setTimeout(() => {
[Link] = 'gray';
[Link] = 'yellow';
[Link] = 'gray';
setTimeout(() => {
[Link] = 'gray';
[Link] = 'gray';
[Link] = 'green';
switchLights(); // Repeat the cycle
}, 2000);
}, 1000);
}, 2000);
}
switchLights();
OUTPUT:
Random Quotes Generator using HTML,CSS and JS
HTML:
<!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="[Link]">
<title>Random Quotes Generator</title>
</head>
<body>
<div class="container">
<h1>Random Quotes Generator</h1>
<div class="quote">
<p id="quoteText">Click below to generate a random quote</p>
</div>
<button id="generateBtn">Generate Quote</button>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
.container {
text-align: center;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
h1 {
color: #333;
.quote {
margin: 20px 0;
#generateBtn {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
border: none;
color: #fff;
border-radius: 5px;
cursor: pointer;
JAVASCRIPT:
const quotes = [
"The only way to do great work is to love what you do. - Steve Jobs",
"Success is not final, failure is not fatal: It is the courage to continue that counts. -
Winston Churchill",
"Believe you can and you're halfway there. - Theodore Roosevelt",
"The future belongs to those who believe in the beauty of their dreams. - Eleanor
Roosevelt",
"In the middle of every difficulty lies opportunity. - Albert Einstein",
"The only limit to our realization of tomorrow will be our doubts of today. - Franklin D.
Roosevelt",
"Life is what happens when you're busy making other plans. - John Lennon"
];
function generateRandomQuote() {
const randomIndex = [Link]([Link]() * [Link]);
const quoteText = [Link]("quoteText");
[Link] = quotes[randomIndex];
const generateBtn = [Link]("generateBtn");
[Link]("click", generateRandomQuote);
OUTPUT:
Captcha Generation and Validation using HTML,CSS and JS
HTML:
<!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="[Link]">
<title>CAPTCHA Example</title>
</head>
<body>
<div class="captcha-container">
<p>Prove you're not a robot:</p>
<div class="captcha-box">
<span id="captcha-operation"></span>
<input type="text" id="captcha-input" placeholder="Enter result">
<button id="captcha-submit">Submit</button>
</div>
<p id="captcha-feedback"></p>
</div>
<script src="[Link]"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
.captcha-container {
text-align: center;
.captcha-box {
margin-top: 10px;
#captcha-feedback {
margin-top: 10px;
JAVASCRIPT:
[Link]("DOMContentLoaded", function () {
generateCaptcha();
const captchaInput = [Link]("captcha-input");
const captchaSubmit = [Link]("captcha-submit");
const captchaFeedback = [Link]("captcha-feedback");
[Link]("click", function () {
const userInput = [Link]();
const operationResult = eval([Link]("captcha-operation").textContent);
if (userInput === [Link]()) {
[Link] = "CAPTCHA passed!";
[Link] = "green";
} else {
[Link] = "CAPTCHA failed. Please try again.";
[Link] = "red";
generateCaptcha();
});
});
function generateCaptcha() {
const operators = ["+", "-", "*"];
const num1 = [Link]([Link]() * 10);
const num2 = [Link]([Link]() * 10);
const operator = operators[[Link]([Link]() * [Link])];
const captchaOperation = `${num1} ${operator} ${num2}`;
[Link]("captcha-operation").textContent = captchaOperation;
[Link]("captcha-input").value = "";
[Link]("captcha-feedback").textContent = "";
OUTPUT:
Api Methods using nodejs and expressjs
const express =
require("express") const app =
express()
const port = 5000
[Link]([Link]())
[Link]("/data", (req, res)=>{
[Link]({message : "Get Method"})
})
[Link]("/data", (req, res)=>{
[Link]({message : "Post
Method"})
})
[Link]("/data", (req, res)=>{
[Link]({message : "put Method"})
})
[Link]("/data", (req, res)=>{
[Link]({message : "delete
Method"})
})
[Link]( port, (req, res)=>{
[Link]("server started !...");
})
Output :
Simlpe Program using Angular Js
<style>
.main{
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content:
center;
font-family: 'Poppins', sans-serif;
font-family: 'Quicksand', sans-
serif;
}
.logcomp{ padd
ing: 30px;
border-radius: 6px;
width: 250px;
height: 300px;
gap: 20px;
background: linear-gradient(to bottom right, #ff2ab7, #7522a1);
/* background-color: grey;
*/ color: white;
}
.form{ displa
y: flex;
flex-direction: column;
gap: 10px;
}
input{
padding: 10px;
border-radius:
2px; border: none;
}
.btn{
width: 70px;
padding: 10px;
border-radius:
6px; border: none;
margin-top: 25px;
margin-left: 80px;
}
.login{
color: orange;
}
.in{
color: yellow;
}
.Angular{ c
olor: red;
}
</style>
<div class="main" >
<h3><span class="login" >Log<span class="in">in</span></span> Form Using <span
class="Angular" >[Link]</span> </h3>
<div class="logcomp" >
<h4>Login</h4>
<form class="form" >
<label>Email</label>
<input type="text" />
<label>Password</label>
<input type="text" />
<button class="btn" >Submit</button>
</form>
</div>
</div>
CRUD Operation using nodejs, expressjs and mongodb
const express = require("express")
const mongoose =
require("mongoose")
const use = require("./model/usermodule")
const app =
express() const port
= 5000
const con = async() =>{
const connect = await [Link](`mongodb://[Link]:27017`)
[Link]({name : [Link], host : [Link]});
}
[Link]([Link]())
[Link]("/data", async(req,
res)=>{
const data = await
[Link]()
[Link](200).json(data)
})
[Link]("/data", async(req ,res)=>{
[Link]([Link]);
const data = await [Link]({
username :
[Link],
email :[Link],
password : [Link]
})
[Link](data)
})
con()
if(con){
[Link]( port, (req, res)=>{
[Link]("server started !...");
})
}
Output :