Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions NDV_Code_By_PoojithB/ProductCatalog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Product Catalog</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Navigation -->
<header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>

<!-- Product Grid -->
<main>
<h1>Product Catalog</h1>
<section class="product-grid">
<div class="product">
<img src="smartwatch.jpg" alt="Product 1" />
<h2>Product 1</h2>
<p>Price: $10</p>
<p>Category: Category A</p>
</div>
<div class="product">
<img src="mobile.jpg" alt="Product 2" />
<h2>Product 2</h2>
<p>Price: $30</p>
<p>Category: Category B</p>
</div>
<div class="product">
<img src="flowers.jpg" alt="Product 3" />
<h2>Product 3</h2>
<p>Price: $20</p>
<p>Category: Category C</p>
</div>
</section>
</main>

<!-- Footer -->
<footer>
<p>Connect with us:</p>
<ul>
<li><a href="#">Facebook</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Instagram</a></li>
</ul>
</footer>
</body>
</html>

******css file*******

body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}

header {
background-color: #0f37d4;
padding: 1em 0;
}

nav ul {
list-style: none;
display: flex;
justify-content: center;
margin: 0;
padding: 0;
}

nav li {
margin: 0 1em;
}

nav a {
color: white;
text-decoration: none;
}

main {
padding: 2em;
}

.product-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5em;
}

.product {
border: 1px solid #ccc;
padding: 1em;
text-align: center;
}

footer {
background-color: #333;
color: white;
text-align: center;
padding: 1em;
}

footer ul {
list-style: none;
display: flex;
justify-content: center;
padding: 0;
}

footer li {
margin: 0 1em;
}

footer a {
color: white;
text-decoration: none;
}

/* Responsive Design */
@media (max-width: 600px) {
nav ul {
flex-direction: column;
align-items: center;
}

footer ul {
flex-direction: column;
align-items: center;
}
}