Create a home page along with menu bar, an image and a footer using HTML & CSS

Certainly! Here's an example of a home page layout with a menu bar, an image, and a footer using HTML and CSS:

html
<!DOCTYPE html>
<html>
    <head>
        <title>Home Page</title>
        <style>
            * {
                box-sizing: border-box;
            }

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

            .container {
                max-width: 1200px;
                margin: 0 auto;
                padding: 20px;
            }

            .menu {
                background-color: #333333;
                padding: 10px;
            }

            .menu ul {
                list-style-type: none;
                padding: 0;
                margin: 0;
                overflow: hidden;
            }

            .menu li {
                float: left;
                margin-right: 10px;
            }

            .menu li a {
                display: block;
                color: #ffffff;
                text-align: center;
                padding: 10px 20px;
                text-decoration: none;
            }

            .menu li a:hover {
                background-color: #4CAF50;
            }

            .image {
                margin-top: 20px;
                text-align: center;
            }

            .image img {
                max-width: 100%;
                height: auto;
            }

            .footer {
                background-color: #f2f2f2;
                padding: 10px;
                text-align: center;
            }

        </style>
    </head>
    <body>
        <div class="container">
            <div class="menu">
                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Services</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
            <div class="image">
                <img src="your-image.jpg" alt="Image">
            </div>

            <div class="footer">
                <p>&copy; 2023 Your Company. All rights reserved.</p>
            </div>
        </div>
    </body>
</html>

In this example, the home page layout consists of a container div that holds the menu bar, image, and footer. The menu bar is styled with a dark background color and provides navigation links. The image is centered within the container and displayed using the `<img>` tag, where you should replace `"your-image.jpg"` with the path to your desired image. The footer is styled with a light background color and contains a simple copyright notice.


Output:

img




About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext