Source Code1
Source Code1
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Shopping Cart</title>
</head>
<body>
<header>
<h1>Shopping Cart</h1>
<nav>
<ul>
<li><a href="register.html">Register</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="catalog.html">Catalog</a></li>
<li><a href="cart.html">Cart</a></li>
</ul>
</nav>
</header>
<br>
<footer>
<p>© 2024 Shopping Cart App</p>
</footer>
</body>
</html>
Styles.css
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
/* display: flex; */
align-items: center;
justify-content: center;
height: 100vh;
}
header {
background-color: #333;
color: #fff;
padding: 1em;
text-align: center;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
}
nav a {
text-decoration: none;
color: #fff;
padding: 1em;
}
h1{
color: tomato;
}
h2, h3{
color: #3498de;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 1em;
}
Register.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Registration</title>
<link rel="stylesheet" href="register.css">
</head>
<body>
<header>
<h1>Shopping Cart</h1>
<h2>Registration Page</h2>
</header>
<br><br>
<form method="post">
<h3>User Registration</h3>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<button type="submit">Register</button>
</form>
<br><br>
<footer>
© 2023 Registration Page
</footer>
</body>
</html>
Register.css
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
/* display: flex; */
align-items: center;
justify-content: center;
height: 100vh;
}
header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
form {
margin: auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
text-align: center;
}
h1{
color: tomato;
}
h2, h3{
color: #3498de;
}
label {
display: block;
margin-bottom: 8px;
text-align: left;
}
input {
width: 100%;
padding: 10px;
margin-bottom: 16px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4caf50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 1em;
bottom: 0;
width: 100%;
}
Login.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Login</title>
<link rel="stylesheet" href="login.css">
</head>
<body>
<header>
<h1>Shopping Cart</h1>
<h2>Login Page</h2>
</header>
<br><br>
<div class="form-container">
<form method="post">
<h3>User Login</h3>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<button type="submit">Login</button>
</form>
</div>
<br><br>
<footer>
© 2023 Login Page
</footer>
</body>
</html>
Login.css
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
/* display: flex; */
align-items: center;
justify-content: center;
height: 100vh;
}
header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
h1{
color: tomato;
}
h2, h3{
color: #3498de;
}
.form-container{
text-align: center;
}
form {
margin: auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
text-align: center;
}
form h2{
color: #3498de;
}
label {
display: block;
margin-bottom: 8px;
text-align: left;
}
input {
width: 100%;
padding: 10px;
margin-bottom: 16px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #3498db;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 1em;
bottom: 0;
width: 100%;
}
Catalog.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>
<link rel="stylesheet" href="catalog.css">
</head>
<body>
<header>
<h1>Shopping Cart</h1>
<h2>Catalog Page</h2>
</header>
<section>
<div class="product">
<img src="Images/eye.jpeg" alt="Product 1">
<h2>Product 1</h2>
<p>Description of Product 1.</p>
<p>Price: $19.99</p>
<button>Add to Cart</button>
</div>
<div class="product">
<img src="Images/nature with butterfly.jpg" alt="Product 2">
<h2>Product 2</h2>
<p>Description of Product 2.</p>
<p>Price: $29.99</p>
<button>Add to Cart</button>
</div>
<div class="product">
<img src="Images/Nature with Sun light.jpg" alt="Product 3">
<h2>Product 3</h2>
<p>Description of Product 3.</p>
<p>Price: $49.99</p>
<button>Add to Cart</button>
</div>
<div class="product">
<img src="Images/cameralens.jpg" alt="Product 4">
<h2>Product 4</h2>
<p>Description of Product 4.</p>
<p>Price: $59.99</p>
<button>Add to Cart</button>
</div>
<!-- Add more product entries as needed -->
</section>
<footer>
© 2023 Catalog Page
</footer>
</body>
</html>
Catalog.css
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
h1{
color: tomato;
}
h2, h3{
color: #3498de;
}
section {
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.product {
border: 1px solid #ddd;
margin: 10px;
padding: 10px;
width: 250px;
background-color: #fff;
}
.product img {
width: 100%;
height: auto;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
position: fixed;
bottom: 0;
width: 100%;
}
Cart.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shopping Cart</title>
<link rel="stylesheet" href="cart.css">
</head>
<body>
<header>
<h1>Shopping Cart</h1>
<h2>Cart Page</h2>
</header>
<table>
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Price</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>Product 1</td>
<td>2</td>
<td>$19.99</td>
<td>$39.98</td>
</tr>
<tr>
<td>Product 2</td>
<td>1</td>
<td>$29.99</td>
<td>$29.99</td>
</tr>
<tr>
<td>Product 3</td>
<td>3</td>
<td>$49.99</td>
<td>$149.97</td>
</tr>
<tr>
<td>Product 4</td>
<td>1</td>
<td>$59.99</td>
<td>$59.99</td>
</tr>
</tbody>
</table>
<div class="total">Total: $279.93</div>
<div class="container">
<button type="button" class="btn btn-success">Proceed to Checkout</button>
</div>
<br><br>
<footer>
© 2023 Cart Page
</footer>
</body>
</html>
Cart.css
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
/* display: grid; */
align-items: center;
justify-content: center;
height: 100vh;
}
header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
h1{
color: tomato;
}
h2, h3{
color: #3498de;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #4caf50;
color: white;
}
td {
background-color: #fff;
}
.total {
text-align: right;
font-weight: bold;
}
button {
background-color: #3498db;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
.container{
text-align: center;
}
.center-button {
background-color: #b125ed;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 1em;
bottom: 0;
width: 100%;
}