How to Write HTML Code for Someone to Subscribe to Newsletters

by Brandy Alexander

As a website creator, consider adding a newsletter subscription feature to your pages. This website element invites users to receive your mailings and you get notified when interested parties participate. In this way, you can build a mailing list that allows you to communicate your messages to a dedicated audience and it keeps these viewers interested in you site. Using HyperText Markup Language (HTML), write the code that allows your visitors to subscribe to your own newsletters.


Open a web page file in your text editor. Place your cursor in the area where you want to place the prompt for visitors to subscribe to your newsletter.


Type in opening and closing “

” header tags. Type content between these elements to tell the viewer what the prompt is for. For example:

Subscribe to My Newsletter


Enter a “

” tag. Inside the tag, set the “method” to “post,” the “enctype” to “text/html” and enter your email address after the “action” entry. For instance:

This code line sends any subscription requests to you as an email message.

Type in an “email” entry. Enter an “” tag with the “name” assigned to “email” and the “type” set to “text” as such:


This HTML line asks the user for his email address and provides a text field where he may enter the information.


Create a “Submit” button to allow the user to deliver her information to you by entering the following line of code:


Type in an ending “” tag to complete the code. Save your file when done.

Video of the Day

Brought to you by Techwalla
Brought to you by Techwalla

Items you will need

About the Author

Brandy Alexander has been writing professionally since 2001. She is a glass artist with a Web design and technical writing background. Alexander runs her own art-glass business and has been a contributor to "Glass Line Magazine" as well as various online publications.

More Articles