Follow us on Instagram for updates link

Contact Us Form Using HTML, CSS, and Js

Creating a "Contact Us" Form Using HTML, CSS, and JavaScript

Published on December 30, 2024

A "Contact Us" form is essential for users to get in touch with your team. In this post, we'll design a simple yet elegant form.



HTML Code



<!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>

    <link rel="stylesheet" href="style.css">

</head>

<body>

    <div class="form-container">

        <h2>Contact Us</h2>

        <form id="contactUsForm">

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

            <input type="text" id="name" name="name" placeholder="Enter your name" required>

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

            <input type="email" id="email" name="email" placeholder="Enter your email" required>

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

            <textarea id="message" name="message" placeholder="Enter your message" required></textarea>

            <button type="submit">Send Message</button>

        </form>

    </div>

    <script src="script.js"></script>

</body>

</html>