Complete HTML CSS JS Project Code
Complete HTML CSS JS Project Code
<nav>
<a href="[Link]">Home</a>
<a href="[Link]">Add Student</a>
<a href="[Link]">View Students</a>
</nav>
<section>
<h2>Welcome</h2>
<p>This system is used to manage student details.</p>
</section>
<footer>
<p>BCA Final Year Project</p>
</footer>
</body>
</html>
[Link]
<!DOCTYPE html>
<html>
<head>
<title>Add Student</title>
<link rel="stylesheet" href="css/[Link]">
</head>
<body>
<h2>Add Student</h2>
<form onsubmit="addStudent(); return false;">
<input type="text" id="name" placeholder="Student Name" required>
<input type="text" id="roll" placeholder="Roll Number" required>
<input type="text" id="course" placeholder="Course" required>
<button type="submit">Add Student</button>
</form>
<script src="js/[Link]"></script>
</body>
</html>
[Link]
<!DOCTYPE html>
<html>
<head>
<title>View Students</title>
<link rel="stylesheet" href="css/[Link]">
</head>
<body onload="showStudents()">
<h2>Student List</h2>
<table>
<tr>
<th>Name</th>
<th>Roll No</th>
<th>Course</th>
<th>Action</th>
</tr>
<tbody id="studentTable"></tbody>
</table>
<script src="js/[Link]"></script>
</body>
</html>
[Link]
body{
font-family: Arial;
background:#f0f8ff;
margin:0;
}
header{
background:#0a3d62;
color:white;
padding:15px;
text-align:center;
}
nav{
background:#1e90ff;
padding:10px;
text-align:center;
}
nav a{
color:white;
margin:10px;
text-decoration:none;
}
table{
width:80%;
margin:auto;
border-collapse:collapse;
}
table,th,td{
border:1px solid black;
padding:8px;
text-align:center;
}
button{
background:#1e90ff;
color:white;
border:none;
padding:5px 10px;
}
footer{
background:#0a3d62;
color:white;
text-align:center;
padding:10px;
}
[Link]
let students = [];
function addStudent(){
let name=[Link]("name").value;
let roll=[Link]("roll").value;
let course=[Link]("course").value;
[Link]({name,roll,course});
alert("Student Added Successfully");
}
function showStudents(){
let table=[Link]("studentTable");
[Link]="";
[Link]((s,i)=>{
[Link]+=`
<tr>
<td>${[Link]}</td>
<td>${[Link]}</td>
<td>${[Link]}</td>
<td><button onclick="deleteStudent(${i})">Delete</button></td>
</tr>`;
});
}
function deleteStudent(index){
[Link](index,1);
showStudents();
}
JavaScript in the system dynamically handles student data storage and manipulation. The 'addStudent()' function adds user inputs to the 'students' array, simulating a database addition, and notifies users of success via alerts. The 'showStudents()' function retrieves and displays this array data in a table format, enabling interactive deletion through the 'deleteStudent()' function which updates the display without refreshing the page, demonstrating dynamic content management and responsiveness .
The system exhibits user-friendly design by structuring content across separate pages for clarity, such as distinct pages for adding and viewing students. It employs a consistent color theme and clear navigation links to promote ease of use. Furthermore, the forms and tables are styled for readability and simplicity, facilitating user interactions without overwhelming them with complex visuals or information .
The College Student Management System employs separate HTML files to manage different functionalities, improving organization and ease of navigation. Specifically, 'index.html' serves as the homepage with basic navigation links; 'add-student.html' is dedicated to adding new student information through a form; and 'view-student.html' displays the student list using a table format that interacts with stored data via JavaScript functions .
The 'nav' element organizes hyperlinks to the main components of the management system—Home, Add Student, and View Students. It strategically provides constant availability of these links at the top of each page, ensuring users can easily navigate between core functions. This approach aids usability by reducing the cognitive load involved in locating specific sections and reinforces spatial navigation patterns supported by consistent site structure .
To improve maintainability, the scripts should employ modular coding practices, such as breaking down large functions into smaller, reusable components. Adding comprehensive comments, adhering to naming conventions, implementing error handling mechanisms, and adopting version control systems for code changes would enhance readability, comprehension, and adaptability of scripts for future developers .
Using external CSS and JavaScript files, such as 'css/style.css' and 'js/script.js', centralizes style and behavioral logic, making the code easier to maintain and update. It avoids redundancy by allowing multiple HTML pages to access the same style and script libraries, thus promoting code reuse and a consistent look and functionality across the system .
The current method of using a JavaScript array within the browser for data storage presents significant limitations: it lacks persistence, as all data is lost upon page reload or browser closure, and does not support concurrent multi-user interactions or large datasets effectively. These limitations could hinder scalability and reliability, compromising the system's practicality for production environments .
The table design uses clear boundaries around cells and ample padding for readability, reflecting principles of effective information presentation such as clarity and simplicity. A balanced color scheme and centered text within the table enhance visual hierarchy, enabling users to easily scan and interpret data. Using borders around each cell delineates data clearly, minimizing visual confusion and focusing user attention on content rather than structure .
Enhancements could include implementing additional validation logic in the form's JavaScript, such as checking for unique roll numbers, ensuring that inputs match required formats (e.g., numeric roll numbers), and displaying user-friendly error messages. Client-side validation, combined with AJAX for server-side validation, would reduce erroneous data submissions and enhance user feedback .
The system uses a palette dominated by blues and whites, providing a professional and clean look that supports readability and visual comfort. This aesthetic is underscored by an intuitive layout, with a centered table and prominent buttons simplified through minimal yet functional styling. The predictable and straightforward navigation helps prevent cognitive overload, thus enhancing user experience by ensuring that information retrieval and task execution are smooth and clear .