Google Advertisement

How to Create an Email Subscription Form with Submit Button in HTML – Easy Guide

Google Advertisement
🔥 Read with Full Features on Our Website

Learn how to design a responsive email subscription form using HTML with placeholders and a submit button. Step-by-step guide with source code and clear explanations.

Published on 12 May 2025
By Priya

Creating a subscription form in HTML is one of the most common and essential tasks for any website. Whether you're running a blog, business site, or newsletter, a subscription form helps you collect email addresses and grow your audience.

🔥 Read with Full Features on Our Website

In this tutorial, you’ll learn how to design a clean and functional subscription form using only HTML. We’ll include placeholders and a submit button — and explain every line of the code in simple language.


🛠️ What You’ll Build


📄 HTML Code for Subscription Form

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Email Subscription Form</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background: #f2f2f2;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .subscription-box {
      background: #ffffff;
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .subscription-box h2 {
      margin-bottom: 15px;
      text-align: center;
    }

    input[type="email"] {
      width: 100%;
      padding: 10px;
      margin-bottom: 15px;
      border: 1px solid #ccc;
      border-radius: 5px;
      font-size: 16px;
    }

    input[type="submit"] {
      width: 100%;
      padding: 10px;
      background-color: #007BFF;
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 16px;
      cursor: pointer;
    }

    input[type="submit"]:hover {
      background-color: #0056b3;
    }
  </style>
</head>
<body>

  <div class="subscription-box">
    <h2>Subscribe to our Newsletter</h2>
    <form action="#">
      <input type="email" placeholder="Enter your email address" required>
      <input type="submit" value="Subscribe">
    </form>
  </div>

</body>
</html>

🧩 Step-by-Step Explanation

🔹 Step 1: Basic Structure

<!DOCTYPE html>
<html lang="en">

This declares the HTML version and sets the language to English.

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

🔹 Step 2: Title and CSS

<title>Email Subscription Form</title>

The <style> section includes internal CSS:

body {
  background: #f2f2f2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
❤️ Like 💬 Comment 🔗 Share
Google Advertisement
👉 View Full Version on Main Website ↗
Google Advertisement
👉 Read Full Article on Website