In order to create an email newsletter, we follow the following 3 steps:
To process the input, we first have to create a form, add input fields and a submit button.
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.
Next, let’s create the styling for our newsletter.
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.
We now combine the HTML and CSS files in order to connect the form and the styling for the form.