Simple html code for online shopping website

 Simple HTML code for online shopping website


HTML, CSS, Online Shopping, E-commerce, Web Development, Frontend, Website Structure, Simple Website, Header, Navigation, Products, Featured Products, Description, Add to Cart, Footer,Responsive Design,



Creating a simple online shopping website involves a combination of HTML for structure, CSS for styling, and potentially JavaScript for interactivity. Below is a basic example of HTML code for a simple online shopping website. Note that this is just a skeleton, and a complete and functional online shopping website would require server-side scripting for handling transactions, database interactions, and more.


HTML

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Simple Online Shopping</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            margin: 0;

            padding: 0;

            background-color: #f4f4f4;

        }


        header {

            background-color: #333;

            color: #fff;

            padding: 10px;

            text-align: center;

        }


        nav {

            background-color: #444;

            color: #fff;

            padding: 10px;

            text-align: center;

        }


        section {

            padding: 20px;

        }


        footer {

            background-color: #333;

            color: #fff;

            padding: 10px;

            text-align: center;

            position: absolute;

            bottom: 0;

            width: 100%;

        }

    </style>

</head>

<body>


    <header>

        <h1>Simple Online Shopping</h1>

    </header>


    <nav>

        <a href="#">Home</a> |

        <a href="#">Products</a> |

        <a href="#">Contact</a>

    </nav>


    <section>

        <h2>Featured Products</h2>


        <div class="product">

            <img src="product1.jpg" alt="Product 1">

            <h3>Product 1</h3>

            <p>Description of Product 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

            <button>Add to Cart</button>

        </div>


        <div class="product">

            <img src="product2.jpg" alt="Product 2">

            <h3>Product 2</h3>

            <p>Description of Product 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

            <button>Add to Cart</button>

        </div>

    </section>


    <footer>

        &copy; 2024 Simple Online Shopping. All rights reserved.

    </footer>


</body>

</html>


This is a very basic template and does not include functionality like a shopping cart or transaction processing. For a fully functional online shopping website, you would need to integrate backend technologies, databases, and potentially a JavaScript framework for a more dynamic user experience.

Post a Comment

Previous Post Next Post