Web Final
Web Final
if ($con) {
echo "";
}
else
{
echo "databse failed to connect";
}
?>
<?php
include 'connection.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>
<form action="" method="POST">
<input type="text" name="firstname" placeholder="firstname"
required> <br><br>
<input type="text" name="lastname" placeholder="lastname"
required> <br><br>
<input type="number" name="age" placeholder="age" required>
<br><br>
<input type="submit" name="save_btn" value="SAVE">
<button><a href="View.PhP">View</a></button>
</form>
</div>
<?php
if (isset($_POST['save_btn'])) {
$fname = $_POST['firstname'];
$lname = $_POST['lastname'];
$age = $_POST['age'];
if ($data) {
echo "Data inserted successfully";
} else {
echo "Error: " . mysqli_error($con);
}
}
?>
</body>
</html>
3. View-
<?php
include 'connection.php'; // Include the database connection file
?>
<a href="index1.php">Home</a>
<?php
// Prepare the SQL query
$query = "SELECT * FROM student";
4. Update-
<?php
include 'Connection.php';
$id = $_GET['id'];
$select = "SELECT * FROM student WHERE id='$id'";
$data = mysqli_query($con, $select);
$row = mysqli_fetch_array($data);
?>
<div>
<form action="" method="POST">
<input value="<?php echo $row['firstname'] ?>" type="text"
name="firstname" placeholder="firstname"> <br><br>
<?php
if (isset($_POST['update_btn'])) {
$fname = $_POST['firstname'];
$lname = $_POST['lastname'];
$age = $_POST['age'];
4. delete
<?php
include 'connection.php';
$id = $_GET['id'];
if ($data) {
?>
<script type="text/javascript">
alert("Data Deleted Successfully");
window.open("View.php", "_self"); // Redirect to the 'View.php' page in the
same window
</script>
<?php
} else {
mysqli_close($con);
?>
Ajax CLP
<!DOCTYPE html>
<html>
<style>
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
}
th,
td {
padding: 5px;
}
</style>
<body>
<h1>The XMLHttpRequest Object</h1>
<script>
function loadStudentData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
displayStudentInfo(this);
}
};
xhttp.open("GET", "ajax2.xml", true);
xhttp.send();
}
function loadTeacherData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
displayTeacherInfo(this);
}
};
xhttp.open("GET", "ajax2.xml", true);
xhttp.send();
}
function displayStudentInfo(xml) {
var i;
var xmlDoc = xml.responseXML;
var table =
"<tr><th>Student Code</th><th>Student Name</th><th>Student
ID</th><th>Email</th><th>Blood Group</th></tr>";
var students = xmlDoc.getElementsByTagName("STUDENT");
for (i = 0; i < students.length; i++) {
table +=
"<tr><td>" +
students[i].getElementsByTagName("St_Code")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Student_Name")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Student_ID")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Email")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Blood_Group")[0].childNodes[0]
.nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML = table;
}
function displayTeacherInfo(xml) {
var i;
var xmlDoc = xml.responseXML;
var table =
"<tr><th>Teacher Code</th><th>Teacher Short
Name</th><th>Teacher Department</th></tr>";
var teachers = xmlDoc.getElementsByTagName("TEACHER");
for (i = 0; i < teachers.length; i++) {
table +=
"<tr><td>" +
teachers[i].getElementsByTagName("T_Code")[0].childNodes[0]
.nodeValue +
"</td><td>" +
teachers[i].getElementsByTagName("Teacher_Short_Name")[0]
.childNodes[0].nodeValue +
"</td><td>" +
teachers[i].getElementsByTagName("Teacher_Department")[0]
.childNodes[0].nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML = table;
}
</script>
</body>
</html>
<SCHOOL_INFO>
<STUDENTS>
<STUDENT>
<St_Code>101</St_Code>
<Student_Name>anik</Student_Name>
<Student_ID>123456</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>O+</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>102</St_Code>
<Student_Name>Puja</Student_Name>
<Student_ID>234567</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>A-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>103</St_Code>
<Student_Name>Nurul</Student_Name>
<Student_ID>345678</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>B+</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>104</St_Code>
<Student_Name>JUBU</Student_Name>
<Student_ID>456789</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>AB-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>105</St_Code>
<Student_Name>tamim</Student_Name>
<Student_ID>567890</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>O-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>106</St_Code>
<Student_Name>asad</Student_Name>
<Student_ID>678901</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>A+</Blood_Group>
</STUDENT>
</STUDENTS>
<TEACHERS>
<TEACHER>
<T_Code>T001</T_Code>
<Teacher_Short_Name>CM</Teacher_Short_Name>
<Teacher_Department>Computer Science</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T002</T_Code>
<Teacher_Short_Name>PR</Teacher_Short_Name>
<Teacher_Department>Physics</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T003</T_Code>
<Teacher_Short_Name>Pr</Teacher_Short_Name>
<Teacher_Department>Cyber Security</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T004</T_Code>
<Teacher_Short_Name>Df</Teacher_Short_Name>
<Teacher_Department>CS</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T005</T_Code>
<Teacher_Short_Name>Tj</Teacher_Short_Name>
<Teacher_Department>Math</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T006</T_Code>
<Teacher_Short_Name>MD</Teacher_Short_Name>
<Teacher_Department>English</Teacher_Department>
</TEACHER>
</TEACHERS>
</SCHOOL_INFO>
AJAX ANOTHER EXAMLE-
<!DOCTYPE html>
<html>
<body>
<div id="demo">
<h2>Let AJAX change this text</h2>
<button type="button" onclick="loadDoc()">Change Content</button>
</div>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest(); // call new req
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
// req complete , req succesfull,
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp.open("GET", "ajax.xml", true);
xhttp.send();
}
</script>
</body>
</html>
//
<!DOCTYPE html>
<html>
<body onload="loadDoc()">
<div id="demo">
<h2>Let AJAX change this text</h2>
</div>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest(); // call new req
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
// req complete , req succesfull,
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp.open("GET", "ajax.xml", true);
xhttp.send();
}
</script>
</body>
</html>
//
<!DOCTYPE html>
<html>
<style>
table,th,td {
border : 1px solid black;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
<body>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "cd_catalog.xml", true);
xhttp.send();
}
function myFunction(xml) {
var i;
var xmlDoc = xml.responseXML;
var table="<tr><th>Artist</th><th>Title</th></tr>";
var x = xmlDoc.getElementsByTagName("CD");
for (i = 0; i <x.length; i++) {
table += "<tr><td>" +
x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue +
"</td><td>" +
x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML = table;
}
</script>
</body>
</html>a
.XML FILE
<h1>AJAX</h1>
<p>AJAX is not a programming language.</p>
<p>AJAX is a technique for accessing web servers
from a web page.</p>
<p>AJAX stands for Asynchronous JavaScript And
XML.</p>
<script>
function loadStudentData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
displayStudentInfo(this);
}
};
xhttp.open("GET", "ajax2.xml", true);
xhttp.send();
}
function loadTeacherData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
displayTeacherInfo(this);
}
};
xhttp.open("GET", "ajax2.xml", true);
xhttp.send();
}
function displayStudentInfo(xml) {
var i;
var xmlDoc = xml.responseXML;
var table =
"<tr><th>Student Code</th><th>Student Name</th><th>Student
ID</th><th>Email</th><th>Blood Group</th></tr>";
var students = xmlDoc.getElementsByTagName("STUDENT");
for (i = 0; i < students.length; i++) {
table +=
"<tr><td>" +
students[i].getElementsByTagName("St_Code")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Student_Name")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Student_ID")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Email")[0].childNodes[0]
.nodeValue +
"</td><td>" +
students[i].getElementsByTagName("Blood_Group")[0].childNodes[0]
.nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML = table;
}
function displayTeacherInfo(xml) {
var i;
var xmlDoc = xml.responseXML;
var table =
"<tr><th>Teacher Code</th><th>Teacher Short Name</th><th>Teacher
Department</th></tr>";
var teachers = xmlDoc.getElementsByTagName("TEACHER");
for (i = 0; i < teachers.length; i++) {
table +=
"<tr><td>" +
teachers[i].getElementsByTagName("T_Code")[0].childNodes[0]
.nodeValue +
"</td><td>" +
teachers[i].getElementsByTagName("Teacher_Short_Name")[0]
.childNodes[0].nodeValue +
"</td><td>" +
teachers[i].getElementsByTagName("Teacher_Department")[0]
.childNodes[0].nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML = table;
}
</script>
</body>
</html>
.XML FILE-
<SCHOOL_INFO>
<STUDENTS>
<STUDENT>
<St_Code>101</St_Code>
<Student_Name>anik</Student_Name>
<Student_ID>123456</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>O+</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>102</St_Code>
<Student_Name>Puja</Student_Name>
<Student_ID>234567</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>A-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>103</St_Code>
<Student_Name>Nurul</Student_Name>
<Student_ID>345678</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>B+</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>104</St_Code>
<Student_Name>JUBU</Student_Name>
<Student_ID>456789</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>AB-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>105</St_Code>
<Student_Name>tamim</Student_Name>
<Student_ID>567890</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>O-</Blood_Group>
</STUDENT>
<STUDENT>
<St_Code>106</St_Code>
<Student_Name>asad</Student_Name>
<Student_ID>678901</Student_ID>
<Email>[email protected]</Email>
<Blood_Group>A+</Blood_Group>
</STUDENT>
</STUDENTS>
<TEACHERS>
<TEACHER>
<T_Code>T001</T_Code>
<Teacher_Short_Name>CM</Teacher_Short_Name>
<Teacher_Department>Computer
Science</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T002</T_Code>
<Teacher_Short_Name>PR</Teacher_Short_Name>
<Teacher_Department>Physics</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T003</T_Code>
<Teacher_Short_Name>Pr</Teacher_Short_Name>
<Teacher_Department>Cyber
Security</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T004</T_Code>
<Teacher_Short_Name>Df</Teacher_Short_Name>
<Teacher_Department>CS</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T005</T_Code>
<Teacher_Short_Name>Tj</Teacher_Short_Name>
<Teacher_Department>Math</Teacher_Department>
</TEACHER>
<TEACHER>
<T_Code>T006</T_Code>
<Teacher_Short_Name>MD</Teacher_Short_Name>
<Teacher_Department>English</Teacher_Department>
</TEACHER>
</TEACHERS>
</SCHOOL_INFO>
JAVASCRIPT BASIC-
Turn on/off light
<!DOCTYPE html>
<html>
<body>
<button onclick="document.getElementById(`myImage`).src=`bulboff.gif`">
Turn on the image
</button>
<img id="myImage" src="bulboff.gif" style="width: 100px" />
<button onclick="document.getElementById(`myImage`).src=`bulbon.gif`">
Turn off the image
</button>
<p id="demo"></p>
<p id="rio"></p>
<script>
let text = "How are you doing today?";
const myArray = text.split(" ");
document.getElementById("demo").innerHTML =
"Array Length: " + myArray.length + "<br>";
document.getElementById("rio").innerHTML += myArray.join(" ");
</script>
</body>
</html>
////////////////////
.js
let text = "How are you doing today";
// Usage examples
console.log(isPalindrome("racecar")); // Output:
true
console.log(isPalindrome("A man a plan a canal
Panama")); // Output: true
console.log(isPalindrome("Hello, World!")); //
Output: false
console.log(isPalindrome("Step on no pets")); //
Output: true (after removing non-alphanumeric
characters)
<!DOCTYPE html>
<html>
<head>
<title>AJAX XML Example</title>
</head>
<body>
<h2>Employee List</h2>
<div id="result"></div>
<script>
// Create a new XMLHttpRequest object
var xhr = new XMLHttpRequest();
.xml
<?xml version="1.0" encoding="UTF-8"?>
<employees>
<employee>
<name>John Doe</name>
<age>32</age>
<department>Sales</department>
</employee>
<employee>
<name>Jane Smith</name>
<age>27</age>
<department>Marketing</department>
</employee>
<!-- Add more employee elements as needed -->
</employees>
HTML TABLE
<!DOCTYPE html>
<html lang="javascriptreact">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Table Practice</title>
</head>
<body>
<table border="1" height="0" width="0"
cellpadding="12" cellspacing="3">
<tr>
<th rowspan="3">Day</th>
<strong><th
colspan="3">Seminar</th></strong>
</tr>
<tr>
<strong><th
colspan="2">Schedule</th></strong>
<th rowspan="2">Topic</th>
</tr>
<tr>
<th>Begin</th>
<th>End</th>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8.00 a.m</td>
<td rowspan="2">5.00 p.m</td>
<td>Python</td>
</tr>
<tr>
<td>Artifial Intilligence and Machinc
Learning</td>
</tr>
<tr>
<td rowspan="3">Tuesday</td>
<td>8.00 a.m</td>
<td>11.00</td>
<td></td>
</tr>
<tr>
<td>11.00 a.m</td>
<td>2.00 p.m</td>
<td rowspan="2">IoT</td>
</tr>
<tr>
<td>2.00 p.m</td>
<td>12.00 p.m</td>
</tr>
<tr>
<td>Wednesday</td>
<td>8:00 a.m</td>
<td>12.00 p.m</td>
<td>Database SQL</td>
</tr>
</table>
</body>
</html>
OUTPUT—
<!DOCTYPE html>
<html lang="javascriptreact">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Table Practice</title>
</head>
<body>
<table border="1" height="0" width="0"
cellpadding="12" cellspacing="3">
<tr>
<th rowspan="3">Day</th>
<strong><th
colspan="3">Seminar</th></strong>
</tr>
<tr>
<strong><th
colspan="2">Schedule</th></strong>
<th rowspan="2">Topic</th>
</tr>
<tr>
<th>Begin</th>
<th>End</th>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8.00 a.m</td>
<td rowspan="2">5.00 p.m</td>
<td>Python</td>
</tr>
<tr>
<td>Artifial Intilligence and Machinc
Learning</td>
</tr>
<tr>
<td rowspan="3">Tuesday</td>
<td>8.00 a.m</td>
<td>11.00</td>
<td></td>
</tr>
<tr>
<td>11.00 a.m</td>
<td>2.00 p.m</td>
<td rowspan="2">IoT</td>
</tr>
<tr>
<td>2.00 p.m</td>
<td>12.00 p.m</td>
</tr>
<tr>
<td>Wednesday</td>
<td>8:00 a.m</td>
<td>12.00 p.m</td>
<td>Database SQL</td>
</tr>
</table>
</body>
</html>
OUTPUT—
<tr>
<td rowspan="2">CSE 323</td>
<td rowspan="2">Computer and Cyber Security</td>
<td rowspan="2">212_D3</td>
<td>Fri</td>
<td>J105</td>
<td>10.30:AM - 11.45:AM</td>
</tr>
<tr>
<td>Thu</td>
<td>J105</td>
<td>11.00:AM - 12.45:PM</td>
</tr>
<tr>
<td rowspan="2">GED 401-CSE(201)</td>
<td rowspan="2">Financial and Managerial Accounting</td>
<td rowspan="2">212_D1</td>
<td>Mon</td>
<td>J109</td>
<td>8.30:AM - 09.45:AM</td>
</tr>
<tr>
<td>Tue</td>
<td>J109</td>
<td>8.30:AM - 9.45:PM</td>
</tr>
<tr>
<td rowspan="2">CSE 403-CSE(201)</td>
<td rowspan="2">Information System and Design</td>
<td rowspan="2">212_D4</td>
<td>tue</td>
<td>J107</td>
<td>11.00:AM - 12.15:AM</td>
</tr>
<tr>
<td>Mun</td>
<td>J107</td>
<td>11.00:AM - 12.15:PM</td>
</tr>
<tr>
<td>CSE 324-CSE(201)</td>
<td>Integrated Design Project 1</td>
<td>212_D4</td>
<td>Fri</td>
<td>J103</td>
<td>02:15:PM - 04:45PM</td>
</tr>
<tr>
<td>CSE 302-CSE(181)</td>
<td>Web Progrmming Lab</td>
<td>213_D11</td>
<td>Tue</td>
<td>L104</td>
<td>02:00:PM - 04:30PM</td>
</tr>
</table>
LOGIN FORM-
<!DOCTYPE html>
Login css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
html,body{
display: grid;
height: 100%;
width: 100%;
place-items: center;
background-image: url(pexels-steve-johnson-1269968.jpg);
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
font-family: Arial, sans-serif;
background-size: cover;
color: white;
}
::selection{
background: #fa4299;
color: #fff;
}
.wrapper{
overflow: hidden;
max-width: 390px;
background: #fff;
padding: 30px;
border-radius: 5px;
box-shadow: 0px 15px 20px rgba(0,0,0,0.1);
}
.wrapper .title-text{
display: flex;
width: 200%;
}
.wrapper .title{
width: 50%;
font-size: 35px;
font-weight: 600;
text-align: center;
transition: all 0.6s cubic-bezier(0.68,-0.55,0.265,1.55);
}
.wrapper .slide-controls{
position: relative;
display: flex;
height: 50px;
width: 100%;
overflow: hidden;
margin: 30px 0 10px 0;
justify-content: space-between;
border: 1px solid lightgrey;
border-radius: 5px;
}
.slide-controls .slide{
height: 100%;
width: 100%;
color: #fff;
font-size: 18px;
font-weight: 500;
text-align: center;
line-height: 48px;
cursor: pointer;
z-index: 1;
transition: all 0.6s ease;
}
.slide-controls label.signup{
color: #000;
}
.slide-controls .slider-tab{
position: absolute;
height: 100%;
width: 50%;
left: 0;
z-index: 0;
border-radius: 5px;
background: -webkit-linear-gradient(left, #7808e0, #c70626);
transition: all 0.6s cubic-bezier(0.68,-0.55,0.265,1.55);
}
input[type="radio"]{
display: none;
}
#signup:checked ~ .slider-tab{
left: 50%;
}
#signup:checked ~ label.signup{
color: #fff;
cursor: default;
user-select: none;
}
#signup:checked ~ label.login{
color: #000;
}
#login:checked ~ label.signup{
color: #000;
}
#login:checked ~ label.login{
cursor: default;
user-select: none;
}
.wrapper .form-container{
width: 100%;
overflow: hidden;
}
.form-container .form-inner{
display: flex;
width: 200%;
}
.form-container .form-inner form{
width: 50%;
transition: all 0.6s cubic-bezier(0.68,-0.55,0.265,1.55);
}
.form-inner form .field{
height: 50px;
width: 100%;
margin-top: 20px;
}
.form-inner form .field input{
height: 100%;
width: 100%;
outline: none;
padding-left: 15px;
border-radius: 5px;
border: 1px solid lightgrey;
border-bottom-width: 2px;
font-size: 17px;
transition: all 0.3s ease;
}
.form-inner form .field input:focus{
border-color: #1b34c4;
/* box-shadow: inset 0 0 3px #fb6aae; */
}
.form-inner form .field input::placeholder{
color: #999;
transition: all 0.3s ease;
}
form .field input:focus::placeholder{
color: #b3b3b3;
}
.form-inner form .pass-link{
margin-top: 5px;
}
.form-inner form .signup-link{
text-align: center;
margin-top: 30px;
}
.form-inner form .pass-link a,
.form-inner form .signup-link a{
color: #2216c5;
text-decoration: none;
}
.form-inner form .pass-link a:hover,
.form-inner form .signup-link a:hover{
text-decoration: underline;
}
form .btn{
height: 50px;
width: 100%;
border-radius: 5px;
position: relative;
overflow: hidden;
}
form .btn .btn-layer{
height: 100%;
width: 300%;
position: absolute;
left: -100%;
background: -webkit-linear-gradient(right, #b24569, #dd0707, #0c67f0,
#c50a62);
border-radius: 5px;
transition: all 0.4s ease;;
}
form .btn:hover .btn-layer{
left: 0;
}
form .btn input[type="submit"]{
height: 100%;
width: 100%;
z-index: 1;
position: relative;
background: none;
border: none;
color: #fff;
padding-left: 0;
border-radius: 5px;
font-size: 20px;
font-weight: 500;
cursor: pointer;
}
<p
id="descriptrion"
style="
text-align: center;
color: #e20e0e;
font-weight: bold;
font-size: large;
"
>
This form collects data about the programming interests of students from
all Engineering dicipline
</p>
<div class="radio-group">
<label>Gender:</label>
<input type="radio" id="male" name="gender" value="male" required />
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="female" required
/>
<label for="female">Female</label>
</div>
<div class="section">
<h2>Academic Information</h2>
<label for="student-id">Student ID:</label>
<input
type="text"
id="student-id"
name="student-id"
minlength="9"
maxlength="9"
pattern="\d{9}"
required
/>
<label for="department">Department/Program:</label>
<select id="department" name="department" required>
<option value="">Select your department</option>
<option value="cse">Computer Science and Engineering</option>
<option value="eee">Electrical and Electronics Engineering</option>
<option value="me">Mechanical Engineering</option>
<option value="ce">Civil Engineering</option>
</select>
<label for="year">Year Of Study:</label>
<select id="year" name="year" required>
<option value="">Select your year</option>
<option value="1">1st Year</option>
<option value="2">2nd Year</option>
<option value="3">3rd Year</option>
<option value="4">4th Year</option>
</select>
</div>
<fieldset div class="salary">
<label>Are you a Student?</label>
<select id="dropdown">
<option value="YES">YES</option>
<option value="NO">NO</option>
</select>
</fieldset>
<label for="declarative"
>Declarative<input
type="radio"
id="declarative"
name="programming-style"
value="Declarative"
/>
</label>
<br />
<label for="object-oriented"
>Object Oriented<input
type="radio"
id="object-oriented"
name="programming-style"
value="Object Oriented"
/> </label
><br />
</fieldset>
////////////////////////
CSS OF SURVEY
/* COUNTRY CODE */
#country-code {
padding: 5px;
font-size: 16px;
border-radius: 5px;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba(255, 128, 0, 0.3); /* Orange shadow */
}
#number-label {
padding: 5px;
font-size: 16px;
border-radius: 5px;
border: 1px solid #ccc;
margin-left: 5px;
box-shadow: 0 2px 4px rgba(255, 128, 0, 0.3); /* Orange shadow */
}
/* MALE FEMALE */
.radio-group {
display: flex;
align-items: center;
gap: 5px;
margin-bottom: 10px;
background-color: #f79191;
border-radius: 5px;
padding: 10px;
}
.radio-group input[type="radio"] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
border: 2px solid #8e44ad;
outline: none;
margin-right: 5px;
transition: border-color 0.2s ease-in-out;
.radio-group input[type="radio"]:checked {
border-color: #8e44ad;
background-color: #8e44ad;
}
.radio-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
/* ACADEMIC INFO */
.section {
margin-bottom: 20px;
padding: 20px;
background-color: #f79191;opacity: inherit;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(240, 241, 238, 0.3); /* Green shadow */
}
.section h2 {
color: #d803a3f3;
margin-bottom: 10px;
text-align: center;
}
.section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #082abe;
}
.section input[type="text"],
.section select {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 3px;
background-color:#FFF5EE;
color: #ee3f3f; /*lekhar color*/
font-size: 14px;
margin-bottom: 15px;
}
.section input[type="text"]:focus,
.section select:focus {
outline: none;
border-color: #888;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
/* BODY TO REST PART */
body {
background-image: url(pexels-fwstudio-129731.jpg);
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
background-position: center;
font-family: Arial, sans-serif;
background-size: cover;
color: white;
h1 {
text-align: center;
color: #e20e0e;
text-shadow: 2px 2px 4px rgba(238, 10, 10, 0.5);
margin-bottom: 20px;
#description {
text-align: center;
color: #350dc570;
margin-bottom: 30px;
form {
max-width: 600px;
margin: 0 auto;
background-color: #FFFFFF;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
color: #ee3f3f; /* Purple shadow */
}
fieldset {
border: none;
padding: 10px;
margin-bottom: 20px;
background-color: #f79191; /* background of all sections ofcolor i cant
undeerstnd*/
border-radius: 5px;
box-shadow: 0 2px 4px rgba(255, 192, 203, 0.3); /* Pink shadow */
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #082abe; /*background off all section heading*/
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
textarea {
width: 100%;
padding: 8px;
border: 1px solid #FF7F50;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 10px;
background-color: #FFF5EE;
color: #f79191;
}
.personal-info input[type=tel],select{
color: #f79191;
}
select {
width: 100%;
padding: 8px;
border: 1px ;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 10px;
background-color: #FFF5EE;
color: #ee3f3f;
.prog-styles p,
.languages p {
margin-bottom: 10px;
color: #1a75ff;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px;
}
textarea {
resize: vertical;
}
input[type="submit"] {
background-color: #FF6347;
color: #FFFFFF;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
float: right;
box-shadow: 0 2px 4px rgba(255, 165, 0, 0.5); /* Orange shadow */
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #FF4500;
}
HTML BASIC-MAIL ME
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ANIK FIRST LAB</title>
</head>
<body>
<p>
You can't rely on how you look to sustain you, what sustains us, what is
fundamentally beautiful is compassion; for yourself and your those
around
you. Lorem ipsum dolor sit amet.
</p>
<br />
<h1>HI ANIK</h1>
<h2>hlw how are you</h2>
<h3>im fine</h3>
<h4>do you have any money</h4>
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-aweso
me.min.css"
/>
</head>
<body>
<div class="bennar-contain">
<header>
<div class="logo">
<h1><strong>HW</strong></h1>
</div>
<ul>
<li><a href="#about">About Me</a></li>
<li><a href="#audio">Audio</a></li>
<li><a href="#video">video</a></li>
<li><a href="#gubphoto">GUB-Photo Frame</a></li>
<li><a href="#courses">Courses</a></li>
<li><a href="#routine">Routine</a></li>
</ul>
</header>
<section class="udaashi">
<div class="social-icons">
<span class="fa fa-linkedin"></span>
<span class="fa fa-youtube"></span>
<span class="fa fa-instagram"></span>
</div>
</section>
<div class="text">
<h1>Greetings <br /><span>Beautiful People</span></h1>
<h3>Welcome to my Website</h3>
</div>
</div>
<!--Abaute section-->
<section id="about">
<div class="aboutes-container">
<div class="aboute-herd">
<h1>About Me</h1>
</div>
<div class="about-info">
<div class="aboute-imge">
<img src="img/anik.jpg" width="100%" alt="" />
<img src="img/my.jpg" width="100%" alt="" />
</div>
</div>
<div class="video-text" id="video">
<h1>Video Sections</h1>
<p>Things You Have to Know</p>
<div>
<video class="video-file" controls>
<source
src="img/Internet will NEVER be the Same Again! _ Rise of AI
Videos _ Dhruv Rathee.mp4"
/>
</video>
</div>
<div class="second-video">
<h2>GUB MEMORY</h2>
<video class="video-file" controls>
<source src="img/gub-love.mp4" />
</video>
<video class="video-file" controls>
<source src="img/gub-love1.mp4" />
</video>
<video class="video-file" controls>
<source src="img/gub-lovely1.mp4" />
</video>
<video class="video-file" controls>
<source src="img/my-birthday.mp4" />
</video>
</div>
</div>
</div>
</div>
<div class="video-container">
<div class="fav-video">
<h2>My Favourite Videos</h2>
<video class="video-file" controls>
<source src="img/my-fav.mp4" />
</video>
<video class="video-file" controls>
<source src="img/my-fav2.mp4" />
</video>
</div>
<!--PHOTO FRAME-->
<section id="gubphoto">
<h1 style="text-align: center; font-size: 30px; color: aqua;margin:
20px 0;">GUB Photo frame</h1>
<div class="GUB-Photo">
<div class="gub-frame">
<img src="img/gub7.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub8.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub6.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub9.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub5.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub3.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/gub2.jpg" width="100%" alt="" />
</div>
<div class="gub-frame">
<img src="img/" width="100%" alt="" />
</div>
</div>
</div>
</section>
<section class="register-container" id="courses">
<div class="list-header">
<h1>Register Courses</h1>
<p>Lorem ipsum dolor sit amet, consectetur</p>
</div>
<div class="register-list">
<ul>
<li>INFORMATION SYSTEM AND DESING</li>
<li>Artificial Intelligence</li>
<li>Artificial Intelligence Lab</li>
<li>Web Programming</li>
<li>Web Progrmming Lab</li>
<li>Integrated Design Project 1</li>
<li>Financial and Managerial Accounting</li>
<li>Computer and Cyber Security</li>
</ul>
<div class="gub-img">
<img src="img/gub.jpeg" alt="" />
</div>
<ol>
<li>INFORMATION SYSTEM AND DESING</li>
<li>Artificial Intelligence</li>
<li>Artificial Intelligence Lab</li>
<li>Web Programming</li>
<li>Web Progrmming Lab</li>
<li>Integrated Design Project 1</li>
<li>Financial and Managerial Accounting</li>
<li>Computer and Cyber Security</li>
</ol>
</div>
</section>
<section class="routine-container" id="routine">
<div class="routine">
<table
border="1"
height="800"
width="900"
cellpadding="10"
cellspacing="2"
>
<div class="header">
<h1 class="title">Class Routine</h1>
<p class="student-name">Student Name: Anik hasan</p>
<p class="department">
Department of Computer science & Engineering
</p>
<p class="university">Green University of Bangladesh</p>
</div>
<tr class="header" style="background-color: green">
<th>Day</th>
<th>Course</th>
<th>Section</th>
<th>Day</th>
<th>Class-Room</th>
<th>Time</th>
</tr>
<tr>
<td rowspan="2">CSE 315-CSE(201)</td>
<td rowspan="2">Artificial Intelligence</td>
<td rowspan="2">212_D4</td>
<td>Mon</td>
<td>K104</td>
<td>09.45:AM - 11.00:AM</td>
</tr>
<tr>
<td>Tue</td>
<td>K103</td>
<td>09.45:AM - 11.00:AM</td>
</tr>
<tr>
<td>CSE 316-CSE(201)</td>
<td>Artificial Intelligence Lab</td>
<td>212_D6</td>
<td>Mon</td>
<td>K101</td>
<td>02:00:PM - 04:30PM</td>
</tr>
<tr>
<td rowspan="2">CSE 323</td>
<td rowspan="2">Computer and Cyber Security</td>
<td rowspan="2">212_D3</td>
<td>Fri</td>
<td>J105</td>
<td>10.30:AM - 11.45:AM</td>
</tr>
<tr>
<td>Thu</td>
<td>J105</td>
<td>11.00:AM - 12.45:PM</td>
</tr>
<tr>
<td rowspan="2">GED 401-CSE(201)</td>
<td rowspan="2">Financial and Managerial Accounting</td>
<td rowspan="2">212_D1</td>
<td>Mon</td>
<td>J109</td>
<td>8.30:AM - 09.45:AM</td>
</tr>
<tr>
<td>Tue</td>
<td>J109</td>
<td>8.30:AM - 9.45:PM</td>
</tr>
<tr>
<td rowspan="2">CSE 403-CSE(201)</td>
<td rowspan="2">Information System and Design</td>
<td rowspan="2">212_D4</td>
<td>tue</td>
<td>J107</td>
<td>11.00:AM - 12.15:AM</td>
</tr>
<tr>
<td>Mun</td>
<td>J107</td>
<td>11.00:AM - 12.15:PM</td>
</tr>
<tr>
<td>CSE 324-CSE(201)</td>
<td>Integrated Design Project 1</td>
<td>212_D4</td>
<td>Fri</td>
<td>J103</td>
<td>02:15:PM - 04:45PM</td>
</tr>
<tr>
<td>CSE 302-CSE(181)</td>
<td>Web Progrmming Lab</td>
<td>213_D11</td>
<td>Tue</td>
<td>L104</td>
<td>02:00:PM - 04:30PM</td>
</tr>
</table>
</div>
</section>
</body>
</html>
.header {
background-color: #f2f2f2;
padding: 20px;
text-align: center;
}
.title {
color: #800000;
font-size: 34px;
font-weight: bold;
margin-bottom: 10px;
}
.student-name,
.department,
.university {
color: #bd5252;
font-size: 20px;
margin: 5px 0;
}
header{
width: 100%;
height: 100px;
background: rgb(243, 241, 116);
display: flex;
justify-content: space-around;
align-items: center;
}
header .logo{
flex: 1 ;
color: #884141;
margin-left: 50px;
text-transform: uppercase;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-style: calc(100);
letter-spacing: 1.2px;
display: flex;
justify-content: center;
align-items: center;
}
header ul{
flex: 2;
display: flex;
justify-content: space-evenly;
}
header li{
list-style: none;
}
header li a{
text-decoration: wavy;
color: #884141;
font-weight: bold;
letter-spacing: 1.2px;
text-transform: capitalize;
padding: 20px 20px;
border: 1px solid transparent;
transition: .4s;
}
header ul li a:hover{
border: 1px solid rgb(255, 0, 0);
transform: scale(4);
}
header .menu{
font-size: 2.5em;
display: contents;
}
.udaashi{
padding: 210px;
background-image: url(images/anik-bg.jpg);
background-size: cover;
background-attachment: fixed;
position: relative;
}
/* .udaashi:before{
content: '';
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
background-color: rgba(34, 49, 34, .46);
} */
.udaashi .social-icons{
border-radius: 7px;
position: absolute;
max-width: 290px;
left: 0;
right: 0;
margin: auto;
text-align: center;
transform: translateY(200px);
}
.text{
width: 100%;
display: flex;
flex-direction: column;
margin-left: 80px;
color: white;
transform: translateY(-300px);
}
.text h1{
margin-top: 430px;
font-family: "Poppins", sans-serif;
font-size: 30px;
text-align: center;
letter-spacing: 1.2px;
line-height: 50px;
font-weight: 100;
margin-bottom:10px;
}
.text h1 span{
font-size: 70px;
font-weight: 700;
color: rgb(255, 196, 4);
}
.text h3{
text-align: center;
font-size: 30px;
font-weight: 100;
}
.aboutes-container{
background-color: rgb(206, 206, 206);
padding-top: 50px;
padding-bottom: 50px;
}
.aboute-herd{
text-align: center;
margin-bottom: 40px;
}
.aboute-herd h1{
font-size: 40px;
font-weight: bold;
letter-spacing: 1.2px;
margin-bottom: 10px;
color: rgb(119, 110, 204);
}
.about-info{
width: 90%;
margin: 0px auto;
display: flex;
flex-direction: column-reverse;
justify-content: center;
align-items: center;
gap: 100px;
}
.aboute-imge{
width: 45%;
}
.aboute-imge img{
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0,
0.19);
width: auto;
height: 400px;
}
.about-text{
width: 45%;
}
.about-text h4{
font-size: 30px;
letter-spacing: 1.2px;
margin-bottom: 10px;
color: rgb(119, 110, 204);
}
.about-text p{
font-size: 20px;
letter-spacing: 1.2px;
line-height: 30px;
color: rgb(119, 110, 204);
margin-bottom: 30px;
}
.about-text a{
text-decoration: none;
}
.about-text .mail-btn{
background-color: rgb(119, 110, 204);
padding: 10px 30px;
border: none;
border-radius: 20px;
color: rgb(255, 255, 255);
font-size: 20px;
font-weight: 700;
transform: translate(0.9s);
}
.about-text .mail-btn:hover{
background-color: green;
color: white;
}
.autio-video-info{
width: 60%;
margin: 0px auto;
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
gap: 50px;
}
.audio-text{
text-align: center;
color: #7644ff;
}
.audio-text h1{
font-size: 40px;
letter-spacing: 1.2px;
margin-bottom: 0px;
}
.audio-text p{
font-size: 20px;
letter-spacing: 1.2px;
margin-bottom: 0px;
color: #7644ff;
}
.Audio-file{
background-color: rgb(255, 254, 254);
width: 500px;
border-radius: 5px;
margin-top: 40px;
}
.video-text{
text-align: center;
color: #fd4766;
}
.second-video{
margin-top: 40px;
color: #bd5252;
}
.fav-video{
text-align: center;
text-decoration: double;
color: #bd5252;
}
.gub-frame {
text-align: center;
text-decoration: double;
color: #bd5252;
}
.GUB-Photo{
width: 80%;
margin: 0px auto;
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
}
.gub-frame img {
border-radius: 5px;
}
.video-text h1{
font-size: 40px;
letter-spacing: 1.2px;
margin-bottom: 0px;
}
.video-text p{
font-size: 20px;
letter-spacing: 1.2px;
margin-bottom: 0px;
}
.video-file{
width: 500px;
border-radius: 5px;
margin-top: 20px;
}
.register-container{
background-color: #cece8ae0;
padding-top: 100px;
padding-bottom: 100px;
}
.list-header{
text-align: center;
}
.list-header h1{
font-size: 50px;
letter-spacing: 1.2px;
color: white;
}
.list-header p{
font-size: 20px;
letter-spacing: 1.2px;
color: rgb(187, 187, 187);
}
.register-list{
width: 80%;
margin: 0px auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.register-list ul{
margin-top: 40px;
}
.register-list Ol{
margin-top: 40px;
}
.register-list li{
font-size: 20px;
letter-spacing: 1.2px;
color: white;
margin-bottom: 20px;
}
.gub-img img{
width: 400px;
height: auto;
border-radius: 5px;
}
.register-container{
background-color: #727202;
}
.routine-container{
background: #ffffe0;
padding-top: 50px;
padding-bottom: 50px;
}
table{
margin-left: auto;
margin-right: auto;
color: #333333;
}
.routine-head{
font-size: 40px;
letter-spacing: 1.0px;
margin-bottom: 10px;
}
.student{
font-size: 30px;
letter-spacing: 1.2px;
margin-bottom: 10px;
}
.cse{
font-size: 20px;
letter-spacing: 1.2px;
margin-bottom: 10px;
}
th{
background-color: #800000;
color: white;
font-size: 30px;
}
td{
text-align: center;
font-size: 20px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Picnic Registration Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
padding: 20px;
}
h1 {
text-align: center;
color: #333;
}
img {
margin-bottom: 20px;
display: block;
}
form {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 600px;
margin: 0 auto;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 15px;
}
input[type="submit"] {
background-color: #4caf50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
img {
width: 500px;
margin: 0 auto;
}
</style>
</head>
<body>
<h1>Picnic Registration Form</h1>
<img
src="ibrahim.jpj.JPG"
height="500px"
width="500px"
alt="Hurry hip hip"
/>
<form>
<label for="name">Student Name</label>
<input type="text" id="name" name="name"
required />
<label for="batch">Batch/Year</label>
<input type="text" id="batch" name="batch"
required />
<label>
<input type="checkbox" id="terms"
name="terms" required />
Consent to Terms and Conditions
</label>
<label>
Willingness to Volunteer
<input
type="radio"
id="volunteerYes"
name="volunteer"
value="yes"
required
/>
<label for="volunteerYes">Yes </label>
<input
type="radio"
id="volunteerNo"
name="volunteer"
value="no"
required
/>
<label for="volunteerNo">No</label>
</label>
<label>
Transportation Required
<input
type="radio"
id="transportationYes"
name="transportation"
value="yes"
required
/>
<label for="transportationYes">Yes</label>
<input
type="radio"
id="transportationNo"
name="transportation"
value="no"
required
/>
<label for="transportationNo">No</label>
</label>
<label>
Accommodation Required
<input
type="radio"
id="accommodationYes"
name="accommodation"
value="yes"
required
/>
<label for="accommodationYes">Yes</label>
<input
type="radio"
id="accommodationNo"
name="accommodation"
value="no"
required
/>
<label for="accommodationNo">No</label>
</label>
<label for="comments">Additional
Comments/Queries</label>
<textarea id="comments"
name="comments"></textarea>
CSS-table
/* CSS element Selector */
table {
border-collapse: collapse;
width: 80%;
margin: 0 auto;
animation: fadeIn 1s ease-in-out;
}
/* CSS id Selector */
#mainTable {
background-color: #f2f2f2;
}
/* CSS color */
th, td {
color: #333333;
}
/* CSS Backgrounds */
body {
background-image: url('background.jpg');
background-size: cover;
background-repeat: no-repeat;
}
/* CSS background-color */
th {
background-color: #4CAF50;
color: white;
}
/* CSS Borders */
th, td {
border-style: solid;
}
/* CSS Font */
body {
font-family: Arial, sans-serif;
}
/* CSS Animations */
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
<!DOCTYPE html>
<html lang="javascriptreact">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Table Practice</title>
<link rel="stylesheet" href="desing-css.css"
/>
</head>
<body>
<table border="1" height="0" width="0"
cellpadding="12" cellspacing="3">
<tr>
<th rowspan="3">Day</th>
<strong><th
colspan="3">Seminar</th></strong>
</tr>
<tr>
<strong><th
colspan="2">Schedule</th></strong>
<th rowspan="2">Topic</th>
</tr>
<tr>
<th>Begin</th>
<th>End</th>
</tr>
<tr>
<td rowspan="2">Monday</td>
<td rowspan="2">8.00 a.m</td>
<td rowspan="2">5.00 p.m</td>
<td>Python</td>
</tr>
<tr>
<td>Artifial Intilligence and Machinc
Learning</td>
</tr>
<tr>
<td rowspan="3">Tuesday</td>
<td>8.00 a.m</td>
<td>11.00</td>
<td></td>
</tr>
<tr>
<td>11.00 a.m</td>
<td>2.00 p.m</td>
<td rowspan="2">IoT</td>
</tr>
<tr>
<td>2.00 p.m</td>
<td>12.00 p.m</td>
</tr>
<tr>
<td>Wednesday</td>
<td>8:00 a.m</td>
<td>12.00 p.m</td>
<td>Database SQL</td>
</tr>
</table>
</body>
</html>
Registration Form
—-----------------------------
CODE-
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" href="form.css" />
</head>
<body>
<div>
<div class="container">
<h1>Registration Form</h1>
</div>
<form>
<input
type="image"
src="your image.jpg"
height="150"
width="150"
/><br /><br />
<label for="A">Student Name:</label
><input
type="text"
id="A"
name="fname"
size="20"
value="Anik hasan"
/><br /><br />
<label for="B">Student ID: </label
><input
type="number"
id="B"
size="20"
placeholder="Enter a number"
/><br /><br />
<label for="C">Email: </label
><input
type="email"
id="C"
size="20"
placeholder="Enter Your Email"
required
/><br /><br />
<label for="D">Username: </label
><input
type="text"
id="D"
size="20"
maxlength="15"
placeholder="Enter UserName"
required
/>
<br /><br />
<label for="E">Password: </label
><input
type="password"
id="E"
size="20"
placeholder="Enter Password"
/><br /><br />
<label for="F">Date of Birth: </label
><input
type="date"
id="F"
size="20"
placeholder="Enter Date of Birth"
/><br />
Gender: <br />
<input type="radio" name="gender"
value="M" />Male<br />
<input type="radio" name="gender"
value="F" />Female<br />
Language: <br />
<input type="checkbox" name="language"
value="M" checked />Bengali<br />
<input type="checkbox" name="language"
value="F" />English<br />
Country: <br />
<select name="country">
<option>(Please select your
Country)</option>
<option value="B">Bangladesh</option>
<option value="I">India</option></select
><br /><br />
<label for="G">Address:</label><br />
<textarea
rows="5"
cols="30"
id="G"
placeholder="Enter Your Present Address"
></textarea
><br /><br />
Attach your Documents:<br />
<input type="file" name="Documents" /><br
/><br />
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</form>
</div>
</body>
</html>
—-----------------------------------------------
CSS DSING- FORM REAL
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #c0c0c0;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
h1 {
text-align: center;
margin-top: 0;
}
form {
display: flex;
flex-direction: column;
}
label {
font-weight: bold;
margin-bottom: 5px;
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px;
}
textarea {
resize: vertical;
}
input[type="submit"],
input[type="reset"] {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
}
input[type="reset"] {
background-color: #f44336;
margin-left: 10px;
}
SQ.
1.
1.a
<!DOCTYPE html>
<html>
<head>
<title>Favorite Hobbies</title>
<style>
ul {
list-style-type: none;
padding: 0;
margin: 20px;
}
li {
margin-bottom: 10px;
color: #4CAF50;
font-family: Arial, sans-serif;
font-style: italic;
}
li::before {
content: "\2665"; /* Unicode character for a heart */
color: #ff0000;
font-weight: bold;
margin-right: 10px;
}
</style>
</head>
<body>
<h1>My Favorite Hobbies</h1>
<ul>
<li>Reading books</li>
<li>Playing sports</li>
<li>Hiking</li>
<li>Photography</li>
<li>Traveling</li>
</ul>
</body>
</html>
1.b-
<!DOCTYPE html>
<html>
<head>
<title>Button Example</title>
<style>
button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
</style>
</head>
<body>
<button>Click me!</button>
</body>
</html>
1.c
<!DOCTYPE html>
<html>
<head>
<title>Article Example</title>
<style>
h1 {
text-align: center;
}
h2 {
font-size: 20px;
color: #4CAF50;
}
</style>
</head>
<body>
<h1>Main Heading</h1>
<h2>Subheading 1</h2>
<p>Paragraph 1 under subheading 1.</p>
<p>Paragraph 2 under subheading 1.</p>
<p>Paragraph 3 under subheading 1.</p>
<h2>Subheading 2</h2>
<p>Paragraph 1 under subheading 2.</p>
<p>Paragraph 2 under subheading 2.</p>
<p>Paragraph 3 under subheading 2.</p>
</body>
</html>
2(a) Create an HTML form that includes input fields for the initial term, last term, and
the increment of an arithmetic series. Upon clicking a button, use JavaScript to read
these values, calculate the sum of the arithmetic series, and display the result on the
HTML page.
—----------------------
<!DOCTYPE html>
<html>
<head>
<title>Arithmetic Series Sum Calculator</title>
</head>
<body>
<h1>Arithmetic Series Sum Calculator</h1>
<label for="initialTerm">Initial Term:</label>
<input type="number" id="initialTerm" required>
<br>
<label for="lastTerm">Last Term:</label>
<input type="number" id="lastTerm" required>
<br>
<label for="increment">Increment:</label>
<input type="number" id="increment" required>
<br>
<button onclick="calculateSum()">Calculate Sum</button>
<p id="result"></p>
<script>
function calculateSum() {
const initialTerm = parseInt(document.getElementById("initialTerm").value);
const lastTerm = parseInt(document.getElementById("lastTerm").value);
const increment = parseInt(document.getElementById("increment").value);
3a-Insert-
<?php
// Database connection details
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$database = "your_database";
3b-
<?php
// Database connection details
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$database = "your_database";
Ajax. on click
CRUD stands for Create, Read, Update, and Delete. These are the four basic operations
performed on a database, and PHP is commonly used to implement these operations in web
applications. Here's an overview of how CRUD operations can be implemented using
PHP<!DOCTYPE html>
<html>
<style>
table,th,td {
border : 1px solid black;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
<body>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "cd_catalog.xml", true);
xhttp.send();
}
function myFunction(xml) {
var i;
var xmlDoc = xml.responseXML;
var table="<tr><th>Country</th><th>Company</th><th>Price</th><th>Year</th></tr>";
var x = xmlDoc.getElementsByTagName("CD");
for (i = 0; i <x.length; i++) {
table += "<tr><td>" +
x[i].getElementsByTagName("COUNTRY")[0].childNodes[0].nodeValue +
"</td><td>" +
x[i].getElementsByTagName("COMPANY")[0].childNodes[0].nodeValue +
"</td><td>" +
x[i].getElementsByTagName("PRICE")[0].childNodes[0].nodeValue +
"</td><td>" +
x[i].getElementsByTagName("YEAR")[0].childNodes[0].nodeValue +
"</td></tr>";
}
document.getElementById("demo").innerHTML += table;
}
</script>
</body>
</html>
.xml
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
<CD>
<TITLE>Greatest Hits</TITLE>
<ARTIST>Dolly Parton</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>RCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1982</YEAR>
</CD>
<CD>
<TITLE>Still got the blues</TITLE>
<ARTIST>Gary Moore</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Virgin records</COMPANY>
<PRICE>10.20</PRICE>
<YEAR>1990</YEAR>
</CD>
<CD>
<TITLE>Eros</TITLE>
<ARTIST>Eros Ramazzotti</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>BMG</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1997</YEAR>
</CD>
<CD>
<TITLE>One night only</TITLE>
<ARTIST>Bee Gees</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1998</YEAR>
</CD>
<CD>
<TITLE>Sylvias Mother</TITLE>
<ARTIST>Dr.Hook</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS</COMPANY>
<PRICE>8.10</PRICE>
<YEAR>1973</YEAR>
</CD>
<CD>
<TITLE>Maggie May</TITLE>
<ARTIST>Rod Stewart</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Pickwick</COMPANY>
<PRICE>8.50</PRICE>
<YEAR>1990</YEAR>
</CD>
<CD>
<TITLE>Romanza</TITLE>
<ARTIST>Andrea Bocelli</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>10.80</PRICE>
<YEAR>1996</YEAR>
</CD>
<CD>
<TITLE>When a man loves a woman</TITLE>
<ARTIST>Percy Sledge</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Atlantic</COMPANY>
<PRICE>8.70</PRICE>
<YEAR>1987</YEAR>
</CD>
<CD>
<TITLE>Black angel</TITLE>
<ARTIST>Savage Rose</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Mega</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1995</YEAR>
</CD>
<CD>
<TITLE>1999 Grammy Nominees</TITLE>
<ARTIST>Many</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Grammy</COMPANY>
<PRICE>10.20</PRICE>
<YEAR>1999</YEAR>
</CD>
<CD>
<TITLE>For the good times</TITLE>
<ARTIST>Kenny Rogers</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Mucik Master</COMPANY>
<PRICE>8.70</PRICE>
<YEAR>1995</YEAR>
</CD>
<CD>
<TITLE>Big Willie style</TITLE>
<ARTIST>Will Smith</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1997</YEAR>
</CD>
<CD>
<TITLE>Tupelo Honey</TITLE>
<ARTIST>Van Morrison</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>8.20</PRICE>
<YEAR>1971</YEAR>
</CD>
<CD>
<TITLE>Soulsville</TITLE>
<ARTIST>Jorn Hoel</ARTIST>
<COUNTRY>Norway</COUNTRY>
<COMPANY>WEA</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1996</YEAR>
</CD>
<CD>
<TITLE>The very best of</TITLE>
<ARTIST>Cat Stevens</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Island</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1990</YEAR>
</CD>
<CD>
<TITLE>Stop</TITLE>
<ARTIST>Sam Brown</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>A and M</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1988</YEAR>
</CD>
<CD>
<TITLE>Bridge of Spies</TITLE>
<ARTIST>T'Pau</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Siren</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1987</YEAR>
</CD>
<CD>
<TITLE>Private Dancer</TITLE>
<ARTIST>Tina Turner</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Capitol</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1983</YEAR>
</CD>
<CD>
<TITLE>Midt om natten</TITLE>
<ARTIST>Kim Larsen</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Medley</COMPANY>
<PRICE>7.80</PRICE>
<YEAR>1983</YEAR>
</CD>
<CD>
<TITLE>Pavarotti Gala Concert</TITLE>
<ARTIST>Luciano Pavarotti</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>DECCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1991</YEAR>
</CD>
<CD>
<TITLE>The dock of the bay</TITLE>
<ARTIST>Otis Redding</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Stax Records</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1968</YEAR>
</CD>
<CD>
<TITLE>Picture book</TITLE>
<ARTIST>Simply Red</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Elektra</COMPANY>
<PRICE>7.20</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Red</TITLE>
<ARTIST>The Communards</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>London</COMPANY>
<PRICE>7.80</PRICE>
<YEAR>1987</YEAR>
</CD>
<CD>
<TITLE>Unchain my heart</TITLE>
<ARTIST>Joe Cocker</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>EMI</COMPANY>
<PRICE>8.20</PRICE>
<YEAR>1987</YEAR>
</CD>
</CATALOG>
Now onload-
<!DOCTYPE html>
<html>
<style>
table,th,td {
border : 1px solid black;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
<body onload="loadDoc()">
<h1>The XMLHttpRequest Object</h1>
<br><br>
<table id="demo"></table>
<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "cd_catalog.xml", true);
xhttp.send();
}
function myFunction(xml) {
var i;
var xmlDoc = xml.responseXML;
var
table="<tr><th>Country</th><th>Company</th><th>Price</th
><th>Year</th></tr>";
var x = xmlDoc.getElementsByTagName("CD");
for (i = 0; i <x.length; i++) {
table += "<tr><td>" +
x[i].getElementsByTagName("COUNTRY")[0].childNodes[0].n
odeValue +
"</td><td>" +
x[i].getElementsByTagName("COMPANY")[0].childNodes[0].n
odeValue +
"</td><td>" +
x[i].getElementsByTagName("PRICE")[0].childNodes[0].node
Value +
"</td><td>" +
x[i].getElementsByTagName("YEAR")[0].childNodes[0].node
Value +
"</td></tr>";
}
document.getElementById("demo").innerHTML += table;
}
</script>
</body>
</html>