0% found this document useful (0 votes)
13 views53 pages

WD File Lab

The document outlines the design and implementation of static webpages for an online book store, including an index page, a login page, and a catalogue page for various engineering books. Each page contains navigation links, a header with the store's logo, and sections displaying book details such as cover images, prices, and an 'Add to Cart' button. The aim is to create a user-friendly interface for students and professionals seeking engineering literature.

Uploaded by

coxana4385
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views53 pages

WD File Lab

The document outlines the design and implementation of static webpages for an online book store, including an index page, a login page, and a catalogue page for various engineering books. Each page contains navigation links, a header with the store's logo, and sections displaying book details such as cover images, prices, and an 'Add to Cart' button. The aim is to create a user-friendly interface for students and professionals seeking engineering literature.

Uploaded by

coxana4385
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practical-1

Aim: Design the static webpages required for an


online book store website.
CODE:-
[Link]-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0"> <title>Online Book Store</title>
</head>
<body>
<header>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
</header>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td>
</tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a>
</td>
<td rowspan="4">
<h1>About us </h1>
<p>Welcome to our Online Engineering Bookstore, your one-
stop destination for academic excellence and professional growth. We
specialize in providing a wide collection of <br>
carefully curated engineering books across major branches such
as Computer Science and Engineering (CSE),
Electronics and Communication
Engineering (ECE), Electrical <br> and Electronics Engineering
(EEE), and Civil Engineering.</p>
<p>
Our mission is to make quality technical knowledge accessible
to every student, educator, and professional at the click of a button.
From fundamental textbooks that build a <br> strong
foundation to advanced reference materials that support research
and innovation, we ensure that learners of all
levels find the resources they need. The store offers books <br>on
programming, digital electronics, power
systems, structural design, communication systems, data
science, and many more specialized topics.
<p>With user-friendly navigation, quick search features, and
secure checkout, purchasing your essential study materials has
never been easier. Each book is selected to match the <br>
curriculum requirements of leading universities and industry demands,
making it a reliable choice for both academic
and competitive exam
preparation</p>
<p>Whether you are a student striving for success, a
teacher shaping future engineers, or a professional upgrading
your skills, our online bookstore is here to empower your
<br>engineering joumey.</p>
</p>
</td>
</tr>
<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>
</body>
</html>

Output :-
Practical-2
Aim: Design and implement a static Login Page for user authentication.
CODE:-

[Link]-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Login - Online Book Store</title>
</head>

<body>
<table>
<tr>

<td align="center" width="70%">


<img src="images/[Link]" alt="Logo Image" width="100"
height="100">
</td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>

<td width="11%" align="center"><a href="[Link]">Home</a></td>


<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<form action="">
<h2>Login Page</h2>
<label for="username">User Name: &nbsp;</label>
<input type="text" placeholder="Enter Username"><br><br>
<label for="password">Password:
&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="password" placeholder="Enter Password"><br><br>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
<br><br>
</form>
</td>

</tr>

<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-
Practical-3
Aim: Design a static Catalogue Page that displays
details of all books in a tabular format, including:
1. cover image
2. Author Name
3. Publisher
4. Price
5. Add to Cart button.

CODE:-
[Link]-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSE - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<h2>CSE Books</h2>
<table border="0" cellpadding="40">
<tr>
<td align="center">
<article>
<img src="images/[Link]" alt="cse1" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse2" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse3" width="150"
height="200"><br>
<h4>Rs 870</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse4" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse5" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
</tr>
<tr>
<td align="center">
<article>
<img src="images/[Link]" alt="cse6" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse7" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse8" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse9" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="cse10" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-

[Link]:-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ECE - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<h2>ECE Books</h2>
<table border="0" cellpadding="40">
<tr>
<td align="center">
<article>
<img src="images/[Link]" alt="ece1" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ece2" width="150"
height="200"><br>
<h4>Rs 550</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ece3" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ece4" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ece5" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-
[Link]:-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EEE - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<h2>EEE Books</h2>
<table border="0" cellpadding="40">
<tr>
<td align="center">
<article>
<img src="images/[Link]" alt="eee1" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="eee2" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="eee3" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="eee4" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="eee5" width="150"
height="200"><br>
<h4>Rs 700</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-
[Link]:-

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Civil - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<h2>Civil Books</h2>
<table border="0" cellpadding="40">
<tr>
<td align="center">
<article>
<img src="images/[Link]" alt="ce1" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td
align="center"
> <article>
<img src="images/[Link]" alt="ce2" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ce3" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ce4" width="150"
height="200"><br>
<h4>Rs 2,375</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
<td align="center">
<article>
<img src="images/[Link]" alt="ce5" width="150"
height="200"><br>
<h4>Rs 900</h4>
<img src="images/[Link]" alt="add2cart" width="150"
height="50"> </article>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>

Output:-
Practical-4
Aim: Design a static Cart Page that displays
following:
1. Books added to the cart
2. Showing book name
3. Price
4. Quantity
5. Total amount.
CODE:-

[Link]:-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Cart - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4"
align="center"> <h2>Cart
Items</h2>
<table>
<tr>
<td width="300"><b>Book Name</b></td>
<td width="80"><b>Price</b></td>
<td width="80"><b>Quantity</b></td>
<td><b>Amount</b></td>
</tr>
<tr>
<td>Algorithms to Live By</td>
<td>2,375</td>
<td>2</td>
<td>4,750</td>
</tr>
<tr>
<td>The C Programming Lang.</td>
<td>870</td>
<td>4</td>
<td>3,480</td>
</tr>
<tr>
<td>Cracking the ECE Skills</td>
<td>550</td>
<td>2</td>
<td>1,100</td>
</tr>
<tr>
<td>EEE Gate 2026</td>
<td>700</td>
<td>1</td>
<td>700</td>
</tr>
<tr>
<td>Basic concepts of CIVIL Eng.</td>
<td>900</td>
<td>2</td>
<td>1,800</td>
</tr>
<tr>
<td colspan="4" align="center">
<h3>Total Amount: Rs. 11,830</h3>
</td>
</tr>
<tr>
<td colspan="4" align="center"><button type="button">Proceed to
Checkout</button></td>
</tr>
</table>
</td>
</tr>

<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-
Practical-5
Aim: Design a static Registration Page with a form to
capture user details including:
1. Name
2. Password
3. Email
4. Phone number
5. Sex
6. Date of birth
7. Languages known
8. Address.
CODE:-
[Link]-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Register - Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a> </td>
<td rowspan="4" align="center">
<h2>Registration Page</h2>
<table>
<form action="[Link]">
<tr>
<td><label>Full Name:</label></td>
<td><input type="text" name="fullname" placeholder="Enter
Username"></td> </tr>
<tr>
<td><label>Password:</label></td>
<td><input type="password" name="password"
placeholder="Enter Password"></td>
</tr>
<tr>
<td><label>Email:</label></td>
<td><input type="email" name="email" placeholder="Enter
Email"></td> </tr>
<tr>
<td><label>Mobile No:</label></td>
<td><input type="tel" name="mobile" placeholder="Enter
Mobile"></td> </tr>
<tr>
<td><label>Gender:</label></td>
<td><input type="radio" id="Male" name="gender"> <label
for="Male">Male</label>
<input type="radio" id="Female" name="gender"> <label
for="Female">Female</label>
</td>
</tr>
<tr>
<td><label>Date of Birth:</label> </td>
<td><input type="date" name="dob"></td>
</tr>
<tr>
<td><label>Known Languages:</label></td>
<td> <input type="checkbox"> <label>English</label>
<input type="checkbox"> <label>Telugu</label>
<input type="checkbox"> <label>Hindi</label>
<input type="checkbox">
<label>Tamil</label> </td>
</tr>
<tr>
<td><label>Address:</label></td>
<td><textarea name="address" cols="25"
rows="5"></textarea><br><br>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</td>
</tr>
</form>
</table>
</td>

</tr>

<tr>
<td align="center"><a href="">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="">CIVIL</a></td> </tr>
</table>

</body>

</html>

[Link]-
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Submitted- Online Book Store</title>
</head>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td> </tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a>
</td>
<td rowspan="4" align="center">
<h1 style="text-align: center;">
Congratulations</h1><br>
<h2 style="text-align: center;">Registration
Successful</h2> </td>
</tr>

<tr>
<td align="center"><a href="[Link]">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="[Link]">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="[Link]">CIVIL</a></td> </tr>
</table>

</body>

</html>
Output:-
Practical-8
Aim: Design a web page using CSS to apply different
fonts and styles to elements, and set background
images for the page and individual elements.

CODE:-
Registration_With_Validation.html
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0"> <title>Online Book Store</title>
</head>
<style>
.error
{
colo
r:
red;
font-
size:
14p
x;
mar
gin-
top:
4px;
}
</style>

<body>
<table>
<tr>
<td align="center" width="70%">
<img src="images/[Link]" alt="Logo Image" width="100"
height="100"> </td>
<td>
<h1>Online Book Store</h1>
</td>
</tr>
</table>
<hr>
<nav>
<table width="100%">
<tr>
<td width="11%" align="center"><a
href="[Link]">Home</a></td>
<td width="20%" align="center"><a
href="[Link]">Login</a></td>
<td width="20%" align="center"><a
href="[Link]">Registration</a></td>
<td width="20%" align="center"><a
href="[Link]">Catalogue</a></td>
<td width="20%" align="center"><a
href="[Link]">Cart</a></td>
</tr>
</table>
</nav>
<hr>
<table border="1" width="100%">
<tr>
<td width="150" align="center"> <a href="[Link]">CSE</a>
</td>
<td rowspan="4" align="center">
<h2>Registration Page</h2>
<table>
<form action="[Link]" onsubmit="return
validateForm()"> <tr>
<td><label>Full Name:</label></td>
<td><input type="text" id="name" placeholder="Enter
Username">
<div id="nameError"
class="error"></div> </td>
</tr>
<tr>
<td><label>Password:</label></td>
<td><input type="password" id="password"
placeholder="Enter
Password">
<div id="passwordError"
class="error"></div> </td>
</tr>
<tr>
<td><label>Email:</label></td>
<td><input type="email" name="email"
placeholder="Enter Email"></td> </tr>
<tr>
<td><label>Mobile No:</label></td>
<td><input type="tel" name="mobile" placeholder="Enter
Mobile"></td> </tr>
<tr>
<td><label>Gender:</label></td>
<td><input type="radio" id="Male" name="gender">
<label
for="Male">Male</label>
<input type="radio" id="Female" name="gender">
<label
for="Female">Female</label>
</td>
</tr>
<tr>
<td><label>Date of Birth:</label> </td>
<td><input type="date" name="dob"></td>
</tr>
<tr>
<td><label>Known Languages:</label></td>
<td> <input type="checkbox"> <label>English</label>
<input type="checkbox"> <label>Telugu</label>
<input type="checkbox"> <label>Hindi</label>
<input type="checkbox">
<label>Tamil</label> </td>
</tr>
<tr>
<td><label>Address:</label></td>
<td><textarea name="address" cols="25" rows="5"></textarea><br><br>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</td>
</tr>
</form>
</table>
</td>

</tr>

<tr>
<td align="center"><a href="">ECE</a></td>
</tr>
<tr>
<td align="center"><a href="">EEE</a></td>
</tr>
<tr>
<td align="center"><a
href="">CIVIL</a></td> </tr>
</table>

<script>

function

validateFor

m() {

let name =
[Link]("name").[Link](); let
password =
[Link]("password").[Link]()
;

let nameError =
[Link]("nameError"); let
passwordError =
[Link]("passwordError"); let
valid = true;
function
isAlphabet(char)
{ return (
(char >= 'A' &&
char <= 'Z') || (char
>= 'a' && char <=
'z') || char === ' '
);
}

if ([Link] < 6) {
[Link] = "Name must be at least 6
characters."; valid = false;
} else { let onlyLetters =
true; for (let i = 0; i <
[Link]; i++) { if
(!isAlphabet(name[i]))
{ onlyLetters = false;
break;
}
}
if (!onlyLetters) { [Link] =
"Name must contain alphabets only."; valid =
false;
} else {
[Link]
rHTML = "";
}
}

if ([Link] < 6) {
[Link] = "Password must be at least 6
characters."; valid = false;
} else {
[Link]
rHTML = "";
}
r
e
t
u
r
n
v
a
l
i
d
;

}
</script>

</body>

</html>
OUTPUT:-
Practical-9
Aim: Design a web page using CSS to control
background image repetition and define distinct styles
for links using pseudo-classes:
1. :link
2. :visited
3. :active
4. :hover.

CODE:-

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Background & Link Styling</title>

<style>
/* -------- BACKGROUND SETTINGS ----------- */
body {
background-image: url("[Link] /* random image
*/
background-repeat: no-repeat; /* no repetition */
background-size: cover; /* full screen cover */
background-attachment: fixed; /* fixed background */
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}

.content {
background: rgba(255,255,255,0.8);
width: 80%;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
}

/* -------- LINK STYLES WITH PSEUDO-CLASSES ------------ */

a:link {
color: blue;
font-size: 20px;
text-decoration: none;
}

a:visited { color:
purple;
}

a:hover {
color: red;
text-decoration: underline;
}

a:active { color:
green;
}
</style>
</head>
<body>

<div class="content">
<h1>CSS Background & Link Styling Demo</h1>
<p>This page demonstrates how to control background image repetition and
how to apply different link styles using CSS pseudo-classes.</p>

<h2>Example Link:</h2>
<a href="[Link] target="_blank">Visit Google</a>
</div>

</body>
</html>
OUTPUT:-
Practical-6
Aim: Implement JavaScript validation for the
Registration Page to ensure the following:
1. Name contains only alphabets and is at least 6 characters long
2. Password is at least 6 characters

CODE:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Practical 8 - Registration Form Validation</title>

<style>
body {
font-family: Arial, sans-serif;
background: #f2f2f2;
}

.container {
width: 40%;
margin: 50px auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

h2 {
text-align: center;
}

input {
width: 95%;
padding: 10px;
margin: 8px 0;
border-radius: 5px;
border: 1px solid gray;
}

button {
width: 100%;
padding: 12px;
background: blue;
color: white;
border: none;
font-size: 18px;
cursor: pointer;
border-radius: 5px;
}

button:hover {
background: darkblue;
}

.error {
color: red;
font-size: 14px;
}
</style>

</head>
<body>

<div class="container">
<h2>Registration Form</h2>

<form onsubmit="return validateForm()">

<label>Name:</label>
<input type="text" id="name">
<p class="error" id="nameError"></p>

<label>Password:</label>
<input type="password" id="password">
<p class="error" id="passError"></p>
<label>Email:</label>
<input type="text" id="email">
<p class="error" id="emailError"></p>

<label>Phone Number:</label>
<input type="text" id="phone">
<p class="error" id="phoneError"></p>

<button type="submit">Register</button>

</form>
</div>

<script>
function validateForm() {

let name = [Link]("name").value;


let password = [Link]("password").value;
let email = [Link]("email").value;
let phone = [Link]("phone").value;

let nameError = [Link]("nameError");


let passError = [Link]("passError");
let emailError = [Link]("emailError");
let phoneError = [Link]("phoneError");

// Reset error messages


[Link] = "";
[Link] = "";
[Link] = "";
[Link] = "";

let isValid = true;

// 1. Name Validation - only alphabets + >=6 chars


let namePattern = /^[A-Za-z]{6,}$/;
if (![Link](name)) {
[Link] = "Name must contain only alphabets and
minimum 6 characters.";
isValid = false;
}

// 2. Password Validation - >=6 chars


if ([Link] < 6) {
[Link] = "Password must be at least 6 characters long.";
isValid = false;
}

</script>

</body>
</html>
OUTPUT:-
Practical-7

Aim: Implement JavaScript validation for the


Registration Page to ensure the following:
1. E-mail follows the standard format (name@[Link])
2. Phone Number contains exactly 10 digits.

CODE:-

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Practical 8 - Registration Form Validation</title>

<style>
body {
font-family: Arial, sans-serif;
background: #f2f2f2;
}

.container {
width: 40%;
margin: 50px auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

h2 {
text-align: center;
}

input {
width: 95%;
padding: 10px;
margin: 8px 0;
border-radius: 5px;
border: 1px solid gray;
}

button {
width: 100%;
padding: 12px;
background: blue;
color: white;
border: none;
font-size: 18px;
cursor: pointer;
border-radius: 5px;
}

button:hover {
background: darkblue;
}

.error {
color: red;
font-size: 14px;
}
</style>

</head>
<body>

<div class="container">
<h2>Registration Form</h2>

<form onsubmit="return validateForm()">

<label>Name:</label>
<input type="text" id="name">
<p class="error" id="nameError"></p>

<label>Password:</label>
<input type="password" id="password">
<p class="error" id="passError"></p>
<label>Email:</label>
<input type="text" id="email">
<p class="error" id="emailError"></p>

<label>Phone Number:</label>
<input type="text" id="phone">
<p class="error" id="phoneError"></p>

<button type="submit">Register</button>

</form>
</div>

<script>
function validateForm() {

let name = [Link]("name").value;


let password = [Link]("password").value;
let email = [Link]("email").value;
let phone = [Link]("phone").value;

let nameError = [Link]("nameError");


let passError = [Link]("passError");
let emailError = [Link]("emailError");
let phoneError = [Link]("phoneError");

// Reset error messages


[Link] = "";
[Link] = "";
[Link] = "";
[Link] = "";

let isValid = true;

// 1. Name Validation - only alphabets + >=6 chars


let namePattern = /^[A-Za-z]{6,}$/;
if (![Link](name)) {
[Link] = "Name must contain only alphabets and
minimum 6 characters.";
isValid = false;
}
// 1. Email Validation
let emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[A-Za-
z]{2,}$/;
if (![Link](email)) {
[Link] = "Enter a valid e-mail (example:
name@[Link]).";
isValid = false;
}

// 2. Phone Number Validation - exactly 10 digits


let phonePattern = /^[0-9]{10}$/;
if (![Link](phone)) {
[Link] = "Phone number must be exactly 10 digits.";
isValid = false;
}

return isValid; // prevent form submission if false


}
</script>

</body>
</html>

OUTPUT:-
Practical-10
Aim: Consider a small topic of your choice on which you can develop static
Webpages and try to implement all topics of html, CSS and Js within the topic.

TO DO LIST
CODE:-
//[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>My To-Do App</title>
<link rel="stylesheet" href="[Link]">
</head>

<body>

<header>
<nav class="navbar">
<h2 class="logo">To-DoX</h2>
<ul>
<li><a class="active" href="[Link]">Home</a></li>
<li><a href="[Link]">My Tasks</a></li>

</ul>
</nav>
</header>

<section class="hero">
<h1>Organize Your Day</h1>
<p>A simple To-Do list manager built using HTML, CSS, and JS.</p>
<a href="[Link]"><button class="btn">Start Now</button></a>
</section>

<script src="[Link]"></script>
</body>
</html>
//[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>My Tasks</title>
<link rel="stylesheet" href="[Link]">
</head>

<body>

<header>
<nav class="navbar">
<h2 class="logo">To-DoX</h2>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a class="active" href="[Link]">My Tasks</a></li>
<li><a href="[Link]">About</a></li>
</ul>
</nav>
</header>

<section class="task-section">
<h1>My To-Do List</h1>

<form id="taskForm">
<input type="text" id="taskInput" placeholder="Enter task"
required>
<input type="date" id="taskDate" required>
<button type="submit" class="btn">Add Task</button>
</form>

<table id="taskTable">
<tr>
<th>Task</th>
<th>Date</th>
<th>Action</th>
</tr>
</table>
</section>
<script src="[Link]"></script>
</body>
</html>

//[Link]
body {
margin: 0;
font-family: Arial, sans-serif;
}
/* Navigation Bar */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background: #222;
padding: 10px 20px;
color: white;
}
.navbar ul {
display: flex;
gap: 20px;
}
.navbar a {
color: white;
text-decoration: none;
}
.navbar a:hover {
color: #00eaff;
}
/* Hero Section */
.hero {
height: 60vh;
background: url('[Link]') center/cover;
color: white;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* Button */
.btn {
padding: 10px 20px;
background: #00eaff;
border: none;
cursor: pointer;
transition: 0.3s;
}
.btn:hover {
background: #0086a3;
}
/* Task Section */
.task-section {
padding: 20px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ccc;
padding: 10px;
text-align: center;
}
/* Responsive */
@media (max-width: 600px) {
.navbar ul {
flex-direction: column;
gap: 10px;
}
}
//[Link]
// Load tasks on page load
[Link]("DOMContentLoaded", loadTasks);

// Add task
[Link]("taskForm").addEventListener("submit",
function(e) {
[Link]();
const task = [Link]("taskInput").value;
const date = [Link]("taskDate").value;

const taskObj = { task, date };


saveTask(taskObj);
addTaskToTable(taskObj);

[Link]("taskForm").reset();
});

// Save to LocalStorage
function saveTask(task) {
let tasks = [Link]([Link]("tasks")) || [];
[Link](task);
[Link]("tasks", [Link](tasks));
}

// Display task in table


function addTaskToTable(task) {
const table = [Link]("taskTable");
const row = [Link]();

[Link] = `
<td>${[Link]}</td>
<td>${[Link]}</td>
<td><button onclick="deleteTask(this)">Delete</button></td>
`;
}

// Load tasks from LocalStorage


function loadTasks() {
let tasks = [Link]([Link]("tasks")) || [];
[Link](addTaskToTable);
}

// Delete task
function deleteTask(btn) {
const row = [Link];
const taskText = [Link][0].innerText;

// Remove from LocalStorage


let tasks = [Link]([Link]("tasks")) || [];
tasks = [Link](t => [Link] !== taskText);
[Link]("tasks", [Link](tasks));

[Link]();
}

OUTPUT:-

You might also like