Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

community creator

How to make the email newsletter with HTML and CSS

Behzad Ahmad

In order to create an email newsletter, we follow the following 3 steps:

Step 1: Add HTML

To process the input, we first have to create a form, add input fields and a submit button.

HTML code for the form


  • Line 1: We create a form using the form tag.

  • Lines 2–4: We create a div that displays the heading.

  • Lines 6–12: We create a div that takes the name and email as input using the input type="text" tag. We also add a checkbox for daily updates using the input type="checkbox" tag.

  • Line 14–16: We create a submit button using the input type="submit" tag.

Step 2: Add CSS

Next, let’s create the styling for our newsletter.

CSS code for the form


  • Lines 1–3: We add a border and border color to the form.

  • Lines 6–10: We set the padding and background color for the form.

  • Lines 13–21: We add custom styling for input fields.

  • Lines 22–36: We add styling for the checkbox and the submit button.

Step 3: Combine HTML and CSS

We now combine the HTML and CSS files in order to connect the form and the styling for the form.

Final output


community creator

View all Courses

Keep Exploring