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)

Neon image

Next.js applications: Set up a Neon project in seconds

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started →

👋 Kindness is contagious

Dive into this thoughtful article, cherished within the supportive DEV Community. Coders of every background are encouraged to share and grow our collective expertise.

A genuine "thank you" can brighten someone’s day—drop your appreciation in the comments below!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found value here? A quick thank you to the author makes a big difference.

Okay