DEV Community

Cover image for Subscribe form using HTML and CSS
Kaja Uvais
Kaja Uvais

Posted on

Subscribe form using HTML and CSS

If you're looking to add a subscription form to your website, you've come to the right place! In this blog post, I'll guide you through the process of creating a simple yet stylish subscription form using HTML and CSS.

HTML Structure:

<main>
   <div class="subscribe-card">
   <h2>Stay up to date!</h2>
   <p>Subscribe to our weekly newsletter for <br />
      the latest news and tips.
   </p>
    <form class="form-email">
    <input type="email" aria-label="Email to subscribe" placeholder="email@example.com" class="input-email" required>          <p role="alert" class="error-message">*Please enter a valid email address!</p>
    <button type="submit" class="send-button">
     Subscribe now
    </button>
    </form>
  </div>
</main>
Enter fullscreen mode Exit fullscreen mode

Click Here to download full code:
Source code

Top comments (0)