6 TH
6 TH
NO: 6
SHOPPING WEB PAGE USING CSS
DATE:10.09.24
AIM:
To create the webpage for shopping using CSS.
HTML CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shopping Page</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="product-card">
<img src="https://via.placeholder.com/300" alt="Product 5" class="product-image">
HARIHARAN A 71812201054
<div class="product-title">Luxury Bag</div>
<div class="product-price">$299.99</div>
<button>Add to Cart</button>
</div>
</div>
</section>
</body>
</html>
CSS CODE:
@import
url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');
body {
margin: 0;
padding: 0;
background-color: #f5f7fa;
color: #333;
header {
background-color: #282c34;
padding: 20px;
color: white;
HARIHARAN A 71812201054
text-align: center;
header h1 {
margin: 0;
font-size: 2.5em;
letter-spacing: 2px;
nav {
display: flex;
justify-content: center;
gap: 30px;
background-color: #333;
padding: 15px;
position: sticky;
top: 0;
z-index: 10;
nav a {
color: white;
text-decoration: none;
font-size: 1.2em;
HARIHARAN A 71812201054
transition: color 0.3s;
nav a:hover {
color: #ffcb05;
.hero {
background-size: cover;
background-position: center;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: 2.5em;
.content {
padding: 40px;
max-width: 1200px;
margin: auto;
HARIHARAN A 71812201054
.product-grid {
display: flex;
flex-wrap: wrap;
gap: 30px;
.product-card {
background-color: white;
border-radius: 10px;
padding: 20px;
position: relative;
.product-card:hover {
transform: translateY(-10px);
.product-image {
width: 100%;
border-radius: 10px;
HARIHARAN A 71812201054
margin-bottom: 20px;
.product-title {
font-size: 1.5em;
margin-bottom: 10px;
font-weight: 600;
color: #333;
.product-price {
font-size: 1.2em;
color: #ff5722;
margin-bottom: 15px;
.product-card button {
background-color: #ffcb05;
border: none;
cursor: pointer;
font-size: 1em;
border-radius: 5px;
position: absolute;
HARIHARAN A 71812201054
bottom: 20px;
.product-card button:hover {
background-color: #ffb800;
.featured-section {
background-color: #282c34;
color: white;
text-align: center;
.featured-section h2 {
font-size: 2.5em;
margin-bottom: 40px;
.featured-products {
display: flex;
justify-content: space-around;
gap: 30px;
HARIHARAN A 71812201054
.footer {
background-color: #333;
color: white;
text-align: center;
padding: 20px;
.footer p {
margin: 0;
font-size: 1.2em;
OUTPUT:
RESULT:
Thus the shopping web page is created and verified successfully.
HARIHARAN A 71812201054