Combined code for contact us page

Combined code that you can directly put into your Blogger post's HTML editor:


```html

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

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

    <title>Contact Us</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            margin: 0;

            padding: 0;

        }

        

        header {

            background-color: #333;

            color: white;

            text-align: center;

            padding: 1em 0;

        }

        

        main {

            max-width: 800px;

            margin: 0 auto;

            padding: 2em;

        }

        

        label {

            display: block;

            margin-bottom: 0.5em;

        }

        

        input,

        textarea {

            width: 100%;

            padding: 0.5em;

            margin-bottom: 1em;

            border: 1px solid #ccc;

            border-radius: 4px;

        }

        

        button {

            padding: 0.5em 1em;

            background-color: #333;

            color: white;

            border: none;

            border-radius: 4px;

            cursor: pointer;

        }

        

        button:hover {

            background-color: #555;

        }

    </style>

</head>

<body>

    <header>

        <h1>Contact Us</h1>

    </header>

    <main>

        <form id="contactForm">

            <label for="name">Name:</label>

            <input type="text" id="name" name="name" required>

            

            <label for="email">Email:</label>

            <input type="email" id="email" name="email" required>

            

            <label for="message">Message:</label>

            <textarea id="message" name="message" rows="4" required></textarea>

            

            <button type="submit">Submit</button>

        </form>

    </main>

    <script>

        document.addEventListener("DOMContentLoaded", function () {

            const contactForm = document.getElementById("contactForm");

            

            contactForm.addEventListener("submit", function (e) {

                e.preventDefault();

                

                // You can add your own code here to handle form submission, like sending an email or storing data.

                

                // For example, you can display a confirmation message:

                alert("Thank you for contacting us!");

                

                // Reset the form

                contactForm.reset();

            });

        });

    </script>

</body>

</html>

```


Copy and paste this entire code into your Blogger post's HTML editor. Remember that this is a basic example, and you might need to further customize the code to match your website's design and functionality requirements.

Comments