How to create an email newsletter with CSS?

CSSWeb DevelopmentFront End Technology

Following is the code to create an email newsletter with CSS −


 Live Demo

<!DOCTYPE html>
body {font-family: Arial, Helvetica, sans-serif;font-size: 20px;font-weight: bold;}
   text-align: center;
form {
   border: 3px solid #f1f1f1;
   padding: 20px;
   background-color: #f3f3f3;
   max-width: 800px;
input[type=text], input[type=submit] {
   width: 100%;
   padding: 12px;
   margin: 8px 0;
   display: inline-block;
   border: 1px solid #ccc;
   box-sizing: border-box;
   font-size: 30px;
input[type=checkbox] {
   margin-top: 16px;
input[type=submit] {
   background-color: rgb(236, 255, 61);
   color: rgb(0, 0, 0);
   border: none;
   font-size: 25px;
   font-weight: bolder;
input[type=submit]:hover {
   background-color: rgb(255, 238, 0);
<h1>Email Newsletter Example</h1>
<h2>Subscribe to our Newsletter</h2>
<p>Subscribe to our Newsletter to get latest update in the world of technology and web</p>
<input type="text" placeholder="Name" name="name" required>
<input type="text" placeholder="Email address" name="mail" required>
<input type="checkbox" checked="checked" name="subscribe"> Daily Newsletter
<input type="submit" value="Subscribe">


This will produce the following output −

Published on 08-Apr-2020 10:48:39