Dsa Anurag
Dsa Anurag
INDEX
01. EXPERIMENT:-01
02. EXPERIMENT:-02
03. EXPERIMENT:-03
04. EXPERIMENT:-04
05. EXPERIMENT:-05
06. EXPERIMENT:-06
07. EXPERIMENT:-07
08. EXPERIMENT:-08
09. EXPERIMENT:-09
10. EXPERIMENT:-10
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-01
OBJECTIVE:-
HOMEPAGE:
• The static home page must contain three frames.
• Top frame: Logo and the college name and links to Homepage,Login page, Registration page,
Catalogue page and Cart page (the description of these pages will be given below).
For example: When you click the link “CSE” the catalogue forCSE Books should be
displayed in the Right frame. Right frame: The pages to the linksin the left frame must be
loaded here. Initially this page contains description of the website.
CODE:-
Other than index file we required three more file for homepage .
• top_frame.html
• left_frame.html
• initial_description.html
index.html
<!DOCTYPE html>
<html>
<head>
<title>BIET JHANSI</title>
</head>
<frameset rows="20%, 85%">
Roll.No.:-2300430130009
Name:- Anurag Sharma
top_frame.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bundelkhand Institute of Engineering and Technology" located in Jhansi,
Uttar Pradesh, India</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: rgb(91, 132, 255);
}
h1 {
text-align: center;
margin-top: 1px;
}
nav {
text-align: center;
}
table {
margin: 2px auto;
width: 10%;
}
td {
Roll.No.:-2300430130009
Name:- Anurag Sharma
height: 40px;
}
a{
text-decoration: none;
display: inline-block ;
padding: 10px;
color: #333;
font-weight: bold;
transition: background-color 0.3s;
}
a:hover {
background-color: #ddd;
}
img {
position: absolute; display:
inline-block;margin:
50px;
top: 0;
left: 0;
}
</style>
</head>
<body>
<h1>Bundelkhand Institute of Engineering and Technology ,Jhansi UttarPradesh</h1>
<nav>
<img src="https://media.9curry.com/uploads/organization/image/1299/biet-jhansi-
logo.png" alt="Library Logo" height="100">
<table>
<tr><a href="initial_description.html"
target="rightFrame">Homepage</a></tr>
<tr><a href="login_page.html" target="rightFrame">Login Page</a></tr>
<tr><a href="registration_page.html" target="rightFrame">Registration
Page</a></tr>
<tr><a href="catalogue_page.html" target="rightFrame">Catalogue
Page</a></tr>
<tr><a href="cart_page.html" target="rightFrame">Cart Page</a></tr>
</table>
</nav>
</body>
</html>
Roll.No.:-2300430130009
Name:- Anurag Sharma
left_frame.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Branches in Engineering</title>
<style>
body {
font-family: 'Arial', sans-serif;margin:
0;
padding: 0;
background-color: rgb(91, 132, 255);
}
h2 {
text-align: center;
margin-top: 10px;
}
ul {
list-style-type: none;
padding: 0;
margin: 20px;
}
li {
font-size: 18px; margin-
bottom: 10px; cursor:
pointer; transition: color
0.3s;
}
li:hover {
color: #ccddf0;
transition: background-color 0.3s;
}
</style>
</head>
<body>
<h2>Branches in Engineering</h2>
<ul>
<li onclick="loadCatalog('COMPUTER SCIENCE')">COMPUTER SCIENCE</li>
<li onclick="loadCatalog('ELECTRONICS')">ELECTRONICS</li>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<li onclick="loadCatalog('CIVIL')">CIVIL</li>
</ul>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<script>
function loadCatalog(branch) {
window.parent.rightFrame.location.href = branch.toLowerCase() +
'_catalog.html';
}
</script>
</body>
</html>
initial_description.html
<!DOCTYPE html>
<html>
<head>
<title>Right Frame</title>
</head>
<body>
<h2>Welcome to BIET JHANSI</h2>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERMENT:-02
OBJECTIVE:-
LOGINPAGE:
CODE:-
Create a login file name “login_page.html”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
form {
background-color: #fff;
Roll.No.:-2300430130009
Name:- Anurag Sharma
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
}
label {
display: block;
margin: 10px 0 5px;
font-weight: bold;
}
input {
width: 100%; padding:
10px; margin-bottom:
10px;
box-sizing: border-box;
}
button {
background-color: #007BFF;
color: #fff;
padding: 10px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
button, input[type="reset"] {
margin-right: 10px;
}
</style>
</head>
<body>
<form>
<h2>Login Page</h2>
<label for="username">User Name:</label>
<input type="text" id="username" name="username" required>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<button type="submit">Submit</button><BR>
<input type="reset" value="Reset" >
</form>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-03
OBJECTIVE:-
CATOLOGUE PAGE: The catalogue page should contain thedetails of all the books
available in the website in a
table. The details should contain the following:
CODE:-
Create a new file name “catalogue_page.html”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Catalog Page</title>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<style>
body {
font-family: 'Arial', sans-serif;margin:
0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center; justify-
content: center;height:
100vh;
}
table {
width: 80%;
border-collapse: collapse;
margin: 20px auto;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 12px; text-
align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #007BFF;
color: #fff;
}
img {
max-width: 100px;
max-height: 150px;
border-radius: 5px;
}
button {
background-color: #28a745;
color: #fff;
padding: 8px; border:
none; border-radius:
5px;cursor: pointer;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
button:hover {
Roll.No.:-2300430130009
Name:- Anurag Sharma
background-color: #218838;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Cover Page</th>
<th>Author Name</th>
<th>Publisher</th>
<th>Price</th>
<th>Add to Cart</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://cdn11.bigcommerce.com/s-
phtso/images/stencil/2048x2048/products/4501/5125/9781292263427 37591.1562044734.j
pg?c=2" alt="Book Cover"></td>
<td>Glenn Brookshear and Dennis Brylow</td>
<td>Pearson Education</td>
<td>$19.99</td>
<td><button>Add to Cart</button></td>
</tr>
<tr>
<td><img src="https://arspublications.com/wp-
content/uploads/2019/05/New-DIGITAL-ELECTRONICS-A-784x1024.jpg"
alt="BookCover"></td>
<td>D.Edwin Dhas</td>
<td>ARS Publication</td>
<td>$24.99</td>
<td><button>Add to Cart</button></td>
</tr>
<tr>
<td><img src="https://th.bing.com/th/id/OIP.jtfVbyZe-
W2SP70gFtyBMgHaK0?pid=ImgDet&rs=1" alt="Book Cover"></td>
<td>Errol Van Amsterdam</td>
<td>JUTA</td>
<td>$14.99</td>
<td><button>Add to Cart</button></td>
</tr>
</tbody>
</table>
</body>
Roll.No.:-2300430130009
Name:- Anurag Sharma
</html>
Roll.No.:-2300430130009
Name:- Anurag Sharma
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-04
OBJECTIVE:-
CARTPAGE: The cart page contains the details about the books whichare added to the cart. The cart page
should
look like this:
CODE:-
Create a new file name “cart_page.html”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cart Page</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
table {
width: 80%;
border-collapse: collapse;
margin: 20px auto;
Roll.No.:-2300430130009
Name:- Anurag Sharma
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 12px; text-
align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #007BFF;
color: #fff;
}
td img {
max-width: 80px;
max-height: 120px;
border-radius: 5px;
}
button {
background-color: #dc3545;
color: #fff;
padding: 8px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #c82333;
}
.total {
text-align: right;
padding: 10px; font-
weight: bold;display:
flex;
justify-content: space-between;align-
items: center;
}
.buy-now button {
background-color: #28a745;
Roll.No.:-2300430130009
Name:- Anurag Sharma
color: #fff;
padding: 12px;
Roll.No.:-2300430130009
Name:- Anurag Sharma
.buy-now button:hover {
background-color: #218838;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Book Name</th>
<th>Price</th>
<th>Quantity</th>
<th>Amount</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="https://cdn11.bigcommerce.com/s-
phtso/images/stencil/2048x2048/products/4501/5125/9781292263427 37591.1562044734.j
pg?c=2" alt="Book Cover">
COMPUTER SCIENCE
</td>
<td>$19.99</td>
<td>2</td>
<td>$39.98</td>
<td><button>Remove</button></td>
</tr>
<tr>
<td>
<img src="https://arspublications.com/wp-
content/uploads/2019/05/New-DIGITAL-ELECTRONICS-A-784x1024.jpg" alt="Book Cover">
DIGITAL ELECTRONICS
</td>
<td>$24.99</td>
<td>1</td>
<td>$24.99</td>
<td><button>Remove</button></td>
</tr>
Roll.No.:-2300430130009
Name:- Anurag Sharma
Roll.No.:-2300430130009
Name:- Anurag Sharma
<tr class="total">
<td colspan="3">Total Amount:</td>
<td>$64.97</td>
<td class="buy-now"><button>Buy Now</button></td>
</tr>
</tfoot>
</table>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-05
OBJECTIVE:-
3) E-mailid(text field)
4) Phone Number(text field)
5) Sex(radio button)
6) Date of birth(3 select boxes)
7) Languages known(checkboxes–English, Telugu, Hindi, Tamil)
8) Address(text area)
CODE:-
Create a new file name “registration_page.html”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Page</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
Roll.No.:-2300430130009
Name:- Anurag Sharma
#registration-frame {
width: 60%;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
box-sizing: border-box;
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
textarea {
height: 80px;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px; vertical-
align: middle;
}
button {
background-color: #007BFF;
color: #fff;
padding: 12px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
.radio-group,
Roll.No.:-2300430130009
Name:- Anurag Sharma
.checkbox-group {
display: flex; flex-
wrap: wrap;
margin-bottom: 12px;
}
.radio-group label,
.checkbox-group label {
margin-right: 20px;
display: flex; align-
items: center;
}
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<label>Sex:</label>
<div class="radio-group">
<label for="male"><input type="radio" id="male" name="sex"
value="male"> Male</label>
<label for="female"><input type="radio" id="female" name="sex"
value="female"> Female</label>
</div>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<label>Languages known:</label>
<div class="checkbox-group">
<label for="english"><input type="checkbox" id="english"
name="languages" value="english"> English</label>
<label for="telugu"><input type="checkbox" id="telugu"
name="languages" value="telugu"> Telugu</label>
<label for="hindi"><input type="checkbox" id="hindi"
name="languages" value="hindi"> Hindi</label>
<label for="tamil"><input type="checkbox" id="tamil"
name="languages" value="tamil"> Tamil</label>
</div>
<label for="address">Address:</label>
<textarea id="address" name="address"></textarea>
<button type="submit">Register</button>
</form>
</div>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-06
OBJECTIVE:-
Js VALIDATION: Write JavaScript to validate the following fields ofthe above registration page.
1. Name (Name should contains alphabets and the length should not beless than 6 characters).
2. Password (Password should not be less than 6 characters length).
CODE:-
We have to make changes in “registration_page.html”.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Page</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
#registration-frame {
width: 60%;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
box-sizing: border-box;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
textarea {
height: 80px;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px; vertical-
align: middle;
}
button {
background-color: #007BFF;
color: #fff;
padding: 12px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.radio-group,
.checkbox-group {
display: flex; flex-
wrap: wrap;
margin-bottom: 12px;
}
.radio-group label,
.checkbox-group label {
margin-right: 20px;
display: flex; align-
Roll.No.:-2300430130009
Name:- Anurag Sharma
items: center;
Roll.No.:-2300430130009
Name:- Anurag Sharma
</style>
</head>
<body>
<div id="registration-frame">
<form onsubmit="return validateForm()">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<label>Sex:</label>
<div class="radio-group">
<label for="male"><input type="radio" id="male" name="sex"
value="male"> Male</label>
<label for="female"><input type="radio" id="female" name="sex"
value="female"> Female</label>
</div>
<label>Languages known:</label>
<div class="checkbox-group">
<label for="english"><input type="checkbox" id="english"
name="languages" value="english"> English</label>
<label for="telugu"><input type="checkbox" id="telugu"
name="languages" value="telugu"> Telugu</label>
Roll.No.:-2300430130009
Name:- Anurag Sharma
Roll.No.:-2300430130009
Name:- Anurag Sharma
<label for="address">Address:</label>
<textarea id="address" name="address"></textarea>
<button type="submit">Register</button>
</form>
</div>
<script>
function validateForm() {
// Get input values
var name = document.getElementById('name').value;
var password = document.getElementById('password').value;var
email = document.getElementById('email').value;
var phone = document.getElementById('phone').value;
// Validate Name
if (name.length < 6 || !/^[a-zA-Z]+$/.test(name)) {
alert('Name should contain alphabets, and the length should not beless than 6
characters.');
return false;
}
// Validate Password
if (password.length < 6) {
alert('Password should not be less than 6 characters length.');return false;
}
// Validate Email
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;if
(!emailRegex.test(email)) {
alert('Invalid email address.');return
false;
}
return true;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
</script>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-07
OBJECTIVE:-
Js VALIDATION:
1. E-mailid (should not contain any invalid and must follow thestandard
pattern([email protected])
CODE:-
We have to make changes in “registration_page.html”.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Page</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
#registration-frame {
width: 60%;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
box-sizing: border-box;
}
label {
Roll.No.:-2300430130009
Name:- Anurag Sharma
display: block;
margin-bottom: 8px;
font-weight: bold;
}
textarea {
height: 80px;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px; vertical-
align: middle;
}
button {
background-color: #007BFF;
color: #fff;
padding: 12px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.radio-group,
.checkbox-group {
display: flex; flex-
wrap: wrap;
margin-bottom: 12px;
}
.radio-group label,
.checkbox-group label {
margin-right: 20px;
display: flex; align-
items: center;
Roll.No.:-2300430130009
Name:- Anurag Sharma
Roll.No.:-2300430130009
Name:- Anurag Sharma
</style>
</head>
<body>
<div id="registration-frame">
<form onsubmit="return validateForm()">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<label>Sex:</label>
<div class="radio-group">
<label for="male"><input type="radio" id="male" name="sex"
value="male"> Male</label>
<label for="female"><input type="radio" id="female" name="sex"
value="female"> Female</label>
</div>
<label>Languages known:</label>
<div class="checkbox-group">
<label for="english"><input type="checkbox" id="english"
name="languages" value="english"> English</label>
<label for="telugu"><input type="checkbox" id="telugu"
name="languages" value="telugu"> Telugu</label>
<label for="hindi"><input type="checkbox" id="hindi"
Roll.No.:-2300430130009
Name:- Anurag Sharma
Roll.No.:-2300430130009
Name:- Anurag Sharma
</div>
<label for="address">Address:</label>
<textarea id="address" name="address"></textarea>
<button type="submit">Register</button>
</form>
</div>
<script>
function validateForm() {
// Get input values
var name = document.getElementById('name').value;
var password = document.getElementById('password').value;var
email = document.getElementById('email').value;
var phone = document.getElementById('phone').value;
// Validate Name
if (name.length < 6 || !/^[a-zA-Z]+$/.test(name)) {
alert('Name should contain alphabets, and the length should not beless than 6
characters.');
return false;
}
// Validate Password
if (password.length < 6) {
alert('Password should not be less than 6 characters length.');return false;
}
// Validate Email
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;if
(!emailRegex.test(email)) {
alert('Invalid email address.');return
false;
}
</script>
</body>
Roll.No.:-2300430130009
Name:- Anurag Sharma
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-08
OBJECTIVE:-
CSS: Design a web page using CSS(Cascading Style Sheets) whichincludes the following:
2) Set a background image for both the page and single elements on thepage.
CODE:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Design Example</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f5f5f5;
background-image:
url('https://i.ytimg.com/vi/EFiyQz_V4WI/maxresdefault.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin: 0;
padding: 0;
color: #333;
height: 100vh; /* Ensure the body takes the full height of the viewport
*/
display: flex;
Roll.No.:-2300430130009
Name:- Anurag Sharma
flex-direction: column;
align-items: center; justify-
content: center;
}
h1 {
font-family: 'Georgia', serif;color:
#007BFF;
}
p{
font-style: italic;line-
height: 1.5;
}
.container {
width: 80%; margin:
20px auto;
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.section-with-image {
color: #fff; padding:
40px; text-align:
center;margin: 20px
auto;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.section-with-image h2 {
font-size: 36px;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to CSS Design</h1>
<p>This is a simple example of a web page designed using CSS with differentfont styles
and background images.</p>
</div>
Roll.No.:-2300430130009
Name:- Anurag Sharma
<div class="section-with-image">
<h2>Section with Background Image</h2>
Roll.No.:-2300430130009
Name:- Anurag Sharma
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:09
OBJECTIVE:-
CSS:
CODE:-
Doing some modification in index file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Styles Example</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f5f5f5;
background-image:
url('https://i.ytimg.com/vi/EFiyQz_V4WI/maxresdefault.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin: 0;
padding: 0;
color: #333;
height: 100vh;
display: flex;
flex-direction: column;
Roll.No.:-2300430130009
Name:- Anurag Sharma
h1 {
font-family: 'Georgia', serif;color:
#007BFF;
}
p{
font-style: italic;line-
height: 1.5;
}
.container {
width: 80%; margin:
20px auto;
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.section-with-image {
color: #fff; padding:
40px; text-align:
center;margin: 20px
auto;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.section-with-image h2 {
font-size: 36px;
margin-bottom: 20px;
}
a:visited {
color: #663399;
Roll.No.:-2300430130009
Name:- Anurag Sharma
a:hover {
Roll.No.:-2300430130009
Name:- Anurag Sharma
color: #ff4500;
text-decoration: underline;
}
a:active {
color: #000080;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to BIET Jhansi</h1>
<p>This is a simple example of a web page designed using CSS with different
font styles, background images, and link styles.</p>
</div>
<div class="section-with-image">
<h2>Section with Background Image</h2>
<p>This section has a background image and white text.</p>
</div>
<div class="container">
<p>Visit our <a href="http://bietjhs.ac.in/">website</a> for more
information.</p>
</div>
</body>
</html>
OUTPUT
Roll.No.:-2300430130009
Name:- Anurag Sharma
EXPERIMENT:-10
OBJECTIVE:-
Consider a small topic of your choice on which you can develop staticWebpages and try to implement
all topics of html, CSS and Js within the topic.Choose any one topic.
CODE:-
index.html :-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BIET Hostel Mess Food Quality Survey</title>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap"
rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background: url('https://i.ytimg.com/vi/EFiyQz_V4WI/maxresdefault.jpg')
center/cover no-repeat;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
Roll.No.:-2300430130009
Name:- Anurag Sharma
h1 {
font-size: 36px;
margin-bottom: 20px;
}
form {
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);width:
400px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #333; /* Label color */
}
button {
background-color: #007BFF;
color: #fff;
padding: 10px; border:
none; border-radius:
5px;cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
.error {
color: red; margin-
top: 5px;
}
</style>
</head>
<body>
<h1>BIET Hostel Mess Food Quality Survey</h1>
<form id="surveyForm" onsubmit="return submitForm()">
<label for="name">Your Name:</label>
<input type="text" id="name" name="name" required>
<button type="submit">Submit</button>
<script>
function submitForm() {
var name = document.getElementById('name').value;
var roomNumber = document.getElementById('roomNumber').value; var
mealRating = document.getElementById('mealRating').value; var
feedback = document.getElementById('feedback').value;
return false;
}
Roll.No.:-2300430130009
Name:- Anurag Sharma
thankyou.html :-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Thank You</title>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap"
rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background: url('https://i.ytimg.com/vi/EFiyQz_V4WI/maxresdefault.jpg')
center/cover no-repeat;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
color: #2c5234; /* Dark green for better visibility on a forest
background */
}
h1 {
font-size: 36px;
margin-bottom: 20px;
}
.message {
Roll.No.:-2300430130009
Name:- Anurag Sharma
OUTPUT:-01
Roll.No.:-2300430130009
Name:- Anurag Sharma
OUTPUT:-02
Roll.No.:-2300430130009