# BUILDING AN E-COMMERCE WEBPAGE WITH TAILWIND CSS AND CUSTOM HTML STRUCTURE
## Introduction
Creating a seamless and visually appealing e-commerce website can be accomplished effectively by using modern web technologies such as HTML, CSS, and utility-first frameworks like Tailwind CSS.
This article will walk through the code for a simple yet elegant e-commerce website for "PARANORA", a fictional furniture brand, focusing on the structure and design elements that contribute to a user-friendly experience.
**1. HTML Structure: Organizing the Page Layout**
The webpage is designed using a combination of HTML and Tailwind CSS. The overall structure of the page includes several key sections that enhance both the visual appeal and functionality. These sections include the navigation bar, hero section, product listings, and other important features.
**2. Navigation Bar with Tailwind CSS**
The navigation bar plays a crucial role in providing easy access to the website's sections. The bar is set up to be responsive, utilizing Tailwind's utility classes for layout and design. Here's how it looks
```
<nav class="bg-white shadow-md py-2 px-6 flex items-center justify-between">
<div class="text-2xl font-bold text-gray-800">PARANORA</div>
<ul class="hidden md:flex space-x-6 text-gray-600 font-medium">
<li><a href="#" class="hover:text-gray-900">Latest Products</a></li>
<li><a href="#" class="hover:text-gray-900">Our Collection</a></li>
<li><a href="#" class="hover:text-gray-900">About Us</a></li>
<li><a href="#" class="hover:text-gray-900">Customer Service</a></li>
<li><a href="#" class="hover:text-gray-900">Trending</a></li>
</ul>
<div class="flex items-center space-x-2">
<button class="w-10 h-10 rounded-full">
<img src="/Images/search-alt-svgrepo-com.svg" alt="Search">
</button>
<button class="w-10 h-10 rounded-full">
<img src="/Images/cart-shopping-shop-svgrepo-com.svg" alt="Cart">
</button>
<button class="w-10 h-10 rounded-full">
<img src="/Images/user-profile-svgrepo-com.svg" alt="Profile">
</button>
</div>
</nav>
```
**Features:**
* A logo on the left side.
* A menu with links to various sections like "Latest Products", "About Us", and "Customer Service".
* Icons on the right for search, shopping cart, and user profile.

This structure ensures easy navigation across the website, with responsive behavior on larger screens and mobile-friendly features for smaller devices.
**3. Hero Section: Captivating the User's Attention**
The hero section is typically the first thing users will see when they visit the site, and it’s important to make it engaging. In this example, we use two columns for a balanced layout:
```
<section class="py-16 px-6">
<div class="container mx-auto grid grid-cols-1 md:grid-cols-2 gap-8 items-center">
<div>
<h1 class="text-4xl font-bold text-gray-800">Stylish And Durable Furniture Collection</h1>
</div>
<div>
<p class="text-gray-600 text-lg">Discover our Stylish and Durable Furniture Collection, designed to elevate your space with elegance and lasting quality.</p>
</div>
</div>
</section>
```

Here, we present the main selling point of the brand: Stylish and Durable Furniture. The use of large fonts, clear headings, and a description makes the message clear and inviting to the user.
**4. Product Listing: Showcase Your Items**
In the following sections, the products are displayed in grids, which is a common practice for e-commerce sites to show multiple products efficiently. The products are arranged in five columns and are linked with their respective details:
```
<section class="py-16 px-6">
<div class="container mx-auto grid grid-cols-1 md:grid-cols-5 gap-6">
<div class="text-left">
<span class="text-2xl font-bold">25+ <span class="text-sm">items</span></span>
<p class="text-gray-600">Living Room</p>
</div>
<div class="text-left">
<span class="text-2xl font-bold">10+ <span class="text-sm">items</span></span>
<p class="text-gray-600">Outdoor Furniture</p>
</div>
<div class="text-left">
<span class="text-2xl font-bold">15+ <span class="text-sm">items</span></span>
<p class="text-gray-600">Dining Room</p>
</div>
<div class="text-left">
<span class="text-2xl font-bold">18+ <span class="text-sm">items</span></span>
<p class="text-gray-600">Bed Furniture</p>
</div>
<div class="text-left">
<span class="text-2xl font-bold">12+ <span class="text-sm">items</span></span>
<p class="text-gray-600">Office Furniture</p>
</div>
</div>
</section>
```

Each section lists the number of items available under specific categories such as "Living Room", "Dining Room", and "Outdoor Furniture". This section helps users easily navigate to their area of interest.
**5. Product Details and Custom Search**
For the products, an image and price display are essential. The following section creates a layout for showcasing individual products, including their images, names, and prices:
```
<section class="px-6">
<div class="container mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-8">
<div class="text-center">
<img src="/Images/11.jpeg" alt="EDWIND DINING CHAIR" class="w-full h-auto mb-4">
<p class="font-semibold">EDWIND DINING CHAIR</p>
<p class="text-gray-600">£723 Regular | £634 Member</p>
</div>
<div class="text-center">
<img src="/Images/7.jpeg" alt="EDWIND DINING CHAIR" class="w-full h-auto mb-4">
<p class="font-semibold">EDWIND DINING CHAIR</p>
<p class="text-gray-600">£723 Regular | £634 Member</p>
</div>
</div>
</section>
```

Each product card includes a picture, a name, and pricing details, making it easy for users to make purchase decisions.
**6. Search and Filters: Enhance User Experience**
A custom search bar with an SVG icon and dropdown filters allow users to quickly search for products by category, color, or price. This feature is especially useful for larger product catalogs.
```
<section class="py-8 flex justify-center">
<div class="relative w-4/5">
<input type="text" placeholder="Search Product" class="w-full py-2 px-3 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-500">
<svg class="w-6 h-6 absolute right-4 top-3 text-gray-500" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- SVG content here -->
</svg>
</div>
</section>
```

Conclusion
Although the will be more updates on: footer, and responsiveness, this e-commerce webpage is a perfect example of how to combine Tailwind CSS's utility classes with simple HTML structure to create a visually appealing and functional online store.
With its responsive design, attractive product showcases, and easy-to-use navigation, this layout can serve as the foundation for any furniture or lifestyle brand looking to build an online presence.
**Inspired: **[Dribble](https://dribbble.com/shots/25326059-Paranora-Furniture-Product-List-Page)
Liked the article? **[Hack-md](https://hackmd.io/)** is a great platform that hosts thousands of great articles like this. Sign up for free today and enjoy!
You can as well follow me on [X (Twitter)](https://x.com/joeyovey1)