Tuesday, 20 August 2024

Simple HTML structure

Here’s a simple HTML structure to get you started. This example includes the basic elements needed for a basic webpage:




<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

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

    <title>My First HTML Page</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            margin: 20px;

            background-color: #f4f4f4;

        }

        h1 {

            color: #333;

        }

        p {

            color: #666;

        }

    </style>

</head>

<body>

    <header>

        <h1>Welcome to My Website</h1>

    </header>

    

    <nav>

        <ul>

            <li><a href="#home">Home</a></li>

            <li><a href="#about">About</a></li>

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

        </ul>

    </nav>

    

    <main>

        <section id="home">

            <h2>Home</h2>

            <p>This is the home section of my simple HTML page.</p>

        </section>

        

        <section id="about">

            <h2>About</h2>

            <p>This section contains information about me.</p>

        </section>

        

        <section id="contact">

            <h2>Contact</h2>

            <p>You can reach me at <a href="mailto:example@example.com">example@example.com</a>.</p>

        </section>

    </main>

    

    <footer>

        <p>&copy; 2024 My Website. All rights reserved.</p>

    </footer>

</body>

</html>


No comments:

Post a Comment