Web Application Development
HTML-CSS-JavaScript
Practical-1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Student Registration Form-Bharat Vainsh </title>
</head>
<body>
<h1 align="center">Student Registration Form</h1>
<form action="#" method="post">
<fieldset>
<legend><b>Personal Information</b></legend>
<label>Enrollment No:</label>
<input type="text" name="enroll" placeholder="240210116004" maxlength="12" required>
<br><br>
<label>Full Name:</label>
<input type="text" name="name" placeholder="Enter Full Name" required>
<br><br>
<label>Father's Name:</label>
<input type="text" name="father" required>
<br><br>
<label>Mother's Name:</label>
<input type="text" name="mother">
<br><br>
<label>Date of Birth:</label>
<input type="date" name="dob" required>
<br><br>
<label>Gender:</label>
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="Female"> Female
<input type="radio" name="gender" value="Other"> Other
<br><br>
<label>Blood Group:</label>
<select name="blood">
<option selected>Select</option>
<option>A+</option>
<option>A-</option>
<option>B+</option>
<option>B-</option>
<option>O+</option>
<option>O-</option>
<option>AB+</option>
<option>AB-</option>
</select>
</fieldset>
<br>
<fieldset>
<legend><b>Academic Details</b></legend>
<label>Branch:</label>
<select name="branch" required>
<option selected>Select Branch</option>
<option>Information Technology</option>
<option>Computer Engineering</option>
<option>Mechanical Engineering</option>
<option>Civil Engineering</option>
<option>Electrical Engineering</option>
</select>
<br><br>
<label>Semester:</label>
<input type="number" name="semester" min="1" max="8" required>
<br><br>
<label>Section:</label>
<select>
<option>A</option>
<option>B</option>
</select>
<br><br>
<label>CGPA:</label>
<input type="number" step="0.01" min="0" max="10">
</fieldset>
<br>
<fieldset>
<legend><b>Contact Details</b></legend>
<label>Email:</label>
<input type="email" name="email" placeholder="abc@gmail.com" required>
<br><br>
<label>Mobile:</label>
<input type="tel" name="mobile" pattern="[0-9]{10}" placeholder="98765xxxxx" required>
<br><br>
<label>Address:</label><br>
<textarea rows="4" cols="40"></textarea>
</fieldset>
<br>
<fieldset>
<legend><b>Other Information</b></legend>
<label>Upload Photo:</label>
<input type="file">
<br><br>
<label>Resume:</label>
<input type="file">
<br><br>
<label>Skills:</label><br>
<input type="checkbox"> HTML
<input type="checkbox"> CSS
<input type="checkbox"> JavaScript
<input type="checkbox"> Python
<input type="checkbox"> Java
<br><br>
<label>Favorite Color:</label>
<input type="color">
<br><br>
<label>Website:</label>
<input type="url" placeholder="https://example.com">
<br><br>
<label>Registration Time:</label>
<input type="time">
<br><br>
<label>Admission Month:</label>
<input type="month">
<br><br>
<label>Search Course:</label>
<input type="search">
<br><br>
<label>Password:</label>
<input type="password" minlength="6" required>
</fieldset>
<br>
<input type="checkbox" required>
I agree to the Terms and Conditions.
<br><br>
<input type="submit" value="Register">
<input type="reset" value="Clear">
<input type="button" value="Print">
<input type="hidden" name="college" value="GEC Bhavnagar">
</form>
</body>
</html>
Practical-2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Media GalleryIT-GECBhavnagar</title>
<style>
/* Universal Selector */
*{
margin:0;
padding:0;
box-sizing:border-box;
}
/* Element Selector */
body{
font-family:Arial, sans-serif;
background:#f4f4f4;
}
/* Header */
header{
background:#004080;
color:white;
text-align:center;
padding:20px;
}
/* Class Selector */
.gallery{
display:flex;
flex-wrap:wrap;
justify-content:center;
gap:20px;
padding:20px;
}
/* Figure Design */
figure{
width:300px;
background:white;
border:2px solid gray;
padding:10px;
text-align:center;
border-radius:8px;
}
/* Group Selector */
img,
audio,
video,
iframe{
width:100%;
}
/* Image */
img{
height:200px;
}
/* Video */
video{
height:200px;
}
/* Iframe */
iframe{
height:200px;
border:none;
}
/* Caption */
figcaption{
margin-top:10px;
font-weight:bold;
color:darkblue;
}
/* Footer */
footer{
background:#004080;
color:white;
text-align:center;
padding:15px;
}
/* Responsive Design */
@media screen and (max-width:768px){
.gallery{
flex-direction:column;
align-items:center;
}
figure{
width:90%;
}
}
</style>
</head>
<body>
<header>
<h3>Responsive Media Gallery</h3>
<p>HTML5 Multimedia Elements with CSS</p>
</header>
<section class="gallery">
<figure>
<img src="img/download.jpg" alt="Nature" title="Nature Image">
<figcaption>Beautiful Nature</figcaption>
</figure>
<figure>
<audio controls>
<source src="audio/birds.mp3" type="audio/mpeg">
Your browser does not support audio.
</audio>
<figcaption>Sample Audio</figcaption>
</figure>
<figure>
<video controls>
<source src="video/bvv1.mp4" type="video/mp4">
Your browser does not support video.
</video>
<figcaption>Sample Video</figcaption>
</figure>
<figure>
<iframe width="400" height="250" src=https://www.youtube.com/watch?v=hEGQNxHQZyw" title="YouTube Video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
<figcaption>YouTube Video</figcaption>
</figure>
</section>
<footer>
<p>© 2026 HTML/CSS Practical-IT-GECBhavnagar</p>
</footer>
</body>
</html>
Practical-3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Computer Engineering Department</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark
bg-primary">
<div class="container">
<a class="navbar-brand" href="#">Computer
Engineering</a>
<button class="navbar-toggler" type="button"
data-bs-toggle="collapse"
data-bs-target="#menu">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="menu">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link"
href="#">Home</a></li>
<li class="nav-item"><a class="nav-link"
href="#">About</a></li>
<li class="nav-item"><a class="nav-link"
href="#">Faculty</a></li>
<li class="nav-item"><a class="nav-link"
href="#">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div id="slider" class="carousel
slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/images (1).jfif" height="700px"
class="d-block w-100" alt="Slide1">
</div>
<div class="carousel-item">
<img src="img/images (2).jfif" height="200px"
class="d-block w-100" alt="Slide2">
</div>
<div class="carousel-item">
<img src="img/images.jfif" height="200px"
class="d-block w-100" alt="Slide3">
</div>
</div>
<button class="carousel-control-prev" type="button"
data-bs-target="#slider" data-bs-slide="prev">
<span class="carousel-control-prev-icon"></span>
</button>
<button class="carousel-control-next" type="button"
data-bs-target="#slider" data-bs-slide="next">
<span class="carousel-control-next-icon"></span>
</button>
</div>
<div class="container mt-5">
<h2 class="text-center mb-4">Department
Highlights</h2>
<div class="row">
<div class="col-md-4">
<div class="card">
<img src="https://gecbhavnagar.ac.in/300x200"
class="card-img-top" alt="Lab">
<div class="card-body">
<h5 class="card-title">Computer Lab</h5>
<p class="card-text"> Well-equipped
laboratories with latest systems. </p>
<a href="#" class="btn
btn-primary">Read More</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<img src="https://gecbhavnagar.ac.in/300x200"
class="card-img-top" alt="Faculty">
<div class="card-body">
<h5 class="card-title">Experienced
Faculty</h5>
<p class="card-text"> Highly qualified
and experienced teaching staff. </p>
<a href="#" class="btn
btn-success">Read More</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<img src="https://gecbhavnagar.ac.in/300x200"
class="card-img-top" alt="Placement"> <div class="card-body">
<h5 class="card-title">Placements</h5>
<p class="card-text"> Excellent placement
opportunities in top companies.</p>
<a href="#" class="btn btn-danger">Read
More</a>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-5 mb-5">
<h2 class="text-center">Contact Us</h2>
<form>
<div class="mb-3">
<label class="form-label">Full Name</label>
<input type="text" class="form-control"
placeholder="Enter Name">
</div>
<div class="mb-3">
<label class="form-label">Email</label>
<input type="email" class="form-control"
placeholder="Enter Email">
</div>
<div class="mb-3">
<label class="form-label">Message</label>
<textarea class="form-control" rows="4"></textarea>
</div>
<button type="submit" class="btn
btn-primary"> Send Message </button>
<button type="reset" class="btn
btn-secondary">Clear </button>
</form>
</div>
<footer class="bg-dark text-white text-center
p-3">
<p>© 2026 Computer Engineering Department</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Practical-4
<!DOCTYPE html>
<html>
<head>
<title>Student Registration Validation</title>
<style>
.error{
color:red;
font-size:14px;
}
.success{
color:green;
}
</style>
</head>
<body>
<h2>Student Registration Form</h2>
<form id="studentForm">
Name:
<input type="text" id="name">
<span id="nameError" class="error"></span>
<br><br>
Email:
<input type="email" id="email">
<span id="emailError" class="error"></span>
<br><br>
Mobile:
<input type="text" id="mobile">
<span id="mobileError" class="error"></span>
<br><br>
Password:
<input type="password" id="password">
<span id="passwordError" class="error"></span>
<br><br>
Gender:
<input type="radio" name="gender" id="male"
value="Male">
Male
<input type="radio" name="gender" id="female"
value="Female">
Female
<span id="genderError" class="error"></span>
<br><br>
Course:
<select id="course">
<option value="">Select Course</option>
<option value="IT">
Information Technology
</option>
<option value="Computer Engineering">
Computer Engineering
</option>
<option value="Mechanical">
Mechanical Engineering
</option>
</select>
<span id="courseError" class="error"></span>
<br><br>
<input type="checkbox" id="agree">
I agree to terms and conditions
<span id="agreeError" class="error"></span>
<br><br>
<button type="submit">
Register
</button>
</form>
<p id="message" class="success"></p>
<script>
// DOM Selectors
let form = document.getElementById("studentForm");
// Event Handling
form.addEventListener("submit", function(event)
{
let valid = true;
// Get Values
let name =
document.getElementById("name").value.trim();
let email =
document.getElementById("email").value.trim();
let mobile =
document.getElementById("mobile").value.trim();
let password =
document.getElementById("password").value;
let course =
document.getElementById("course").value;
let gender =
document.querySelector(
'input[name="gender"]:checked'
);
let agree =
document.getElementById("agree").checked;
// Clear Previous Errors
document.getElementById("nameError").innerHTML="";
document.getElementById("emailError").innerHTML="";
document.getElementById("mobileError").innerHTML="";
document.getElementById("passwordError").innerHTML="";
document.getElementById("genderError").innerHTML="";
document.getElementById("courseError").innerHTML="";
document.getElementById("agreeError").innerHTML="";
// Name Validation
if(name=="")
{
document.getElementById("nameError").innerHTML=
"Name is required";
valid=false;
}
// Email Validation
let emailPattern =
/^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if(!emailPattern.test(email))
{
document.getElementById("emailError").innerHTML=
"Enter valid email";
valid=false;
}
// Mobile Validation
let mobilePattern =
/^[0-9]{10}$/;
if(!mobilePattern.test(mobile))
{
document.getElementById("mobileError").innerHTML=
"Enter 10 digit mobile number";
valid=false;
}
// Password Validation
if(password.length < 6)
{
document.getElementById("passwordError").innerHTML=
"Password must contain minimum 6 characters";
valid=false;
}
// Gender Validation
if(gender==null)
{
document.getElementById("genderError").innerHTML=
"Select gender";
valid=false;
}
// Course Validation
if(course=="")
{
document.getElementById("courseError").innerHTML=
"Select course";
valid=false;
}
// Checkbox Validation
if(!agree)
{
document.getElementById("agreeError").innerHTML=
"Accept terms and conditions";
valid=false;
}
// Prevent Form Submission
if(valid==false)
{
event.preventDefault();
}
else
{
document.getElementById("message").innerHTML=
"Registration Successful!";
}
});
</script>
</body>
</html>
Practical-5
<!DOCTYPE html>
<html>
<head>
<title>To-Do List Application</title>
<style>
body{
font-family:Arial;
text-align:center;
background:#f2f2f2;
}
.container{
width:400px;
margin:auto;
background:white;
padding:20px;
border-radius:10px;
}
input{
padding:8px;
width:70%;
}
button{
padding:8px;
margin:5px;
}
li{
list-style:none;
background:#ddd;
margin:10px;
padding:10px;
}
.completed{
text-decoration:line-through;
color:green;
}
</style>
</head>
<body>
<div class="container">
<h2>To-Do List</h2>
<input type="text" id="task"
placeholder="Enter Task">
<button onclick="addTask()">
Add
</button>
<br><br>
<input type="text" id="search"
placeholder="Search Task"
onkeyup="searchTask()">
<ul id="taskList"></ul>
</div>
<script>
// Load tasks from Local Storage
let tasks =
JSON.parse(localStorage.getItem("tasks")) ||
[];
displayTasks();
// Add Task Function
function addTask()
{
let task =
document.getElementById("task").value;
if(task=="")
{
alert("Enter Task");
return;
}
tasks.push(
{
text:task,
completed:false
}
);
saveTasks();
displayTasks();
document.getElementById("task").value="";
}
// Display Tasks
function displayTasks()
{
let list =
document.getElementById("taskList");
list.innerHTML="";
tasks.forEach(function(item,index)
{
let li =
document.createElement("li");
if(item.completed)
{
li.className="completed";
}
li.innerHTML =
item.text +
"<br>" +
"<button onclick='completeTask("+index+")'>Complete</button>"
+
"<button onclick='editTask("+index+")'>Edit</button>"
+
"<button onclick='deleteTask("+index+")'>Delete</button>";
list.appendChild(li);
});
}
// Mark Completed
function completeTask(index)
{
tasks[index].completed =
!tasks[index].completed;
saveTasks();
displayTasks();
}
// Edit Task
function editTask(index)
{
let newTask =
prompt(
"Edit Task",
tasks[index].text
);
if(newTask!=null)
{
tasks[index].text=newTask;
saveTasks();
displayTasks();
}
}
// Delete Task
function deleteTask(index)
{
tasks.splice(index,1);
saveTasks();
displayTasks();
}
// Search Task
function searchTask()
{
let value =
document.getElementById("search")
.value.toLowerCase();
let list =
document.querySelectorAll("#taskList li");
list.forEach(function(item)
{
if(item.innerText
.toLowerCase()
.includes(value))
{
item.style.display="block";
}
else
{
item.style.display="none";
}
});
}
// Save Data
function saveTasks()
{
localStorage.setItem(
"tasks",
JSON.stringify(tasks)
);
}
</script>
</body>
</html>