How to Create a Form in HTML That Can Be Submitted to an Email Address

Open a blank text editor session (e.g., Create a web page using the basic HTML skeleton above: , Enter each of these tags on a separate line, except for the and tags, which can go on the same line., In between the and tags, insert the name of this...

40 Steps 1 min read Advanced

Step-by-Step Guide

  1. Step 1: Open a blank text editor session (e.g.

    Notepad under Windows) or if you have access to a web page editing tool, create a basic web page. ,, Web pages do not require this formatting, but it does make reading web documents easier for mortal humans., the information you intend that the page requests.,,,,, For instance, the code above would display that question on the page.,, The name of all related buttons must share a name.

    All radio buttons named "1" are mutually exclusive, that is, users can select only one from the group.

    The value will be passed to the email message, and the text after the <input...> tag gets displayed by the browser.

    Create more radio buttons for all related responses.,,, The code looks like the example above:,,,,,, In Firefox, for example, go to File, Open File, or hit Ctrl-O or Command-O to open a new document.,,,
  2. Step 2: Create a web page using the basic HTML skeleton above:

  3. Step 3: Enter each of these tags on a separate line

  4. Step 4: except for the <title> and </title> tags

  5. Step 5: which can go on the same line.

  6. Step 6: In between the <title> and </title> tags

  7. Step 7: insert the name of this page or project

  8. Step 8: Hit {Enter} after the <body> tag.

  9. Step 9: On the resulting line

  10. Step 10: type the code above

  11. Step 11: replacing the email address with the email address to which you wish the form sent.

  12. Step 12: Hit {Enter} twice and type </form> just before the closing </html> tag.

  13. Step 13: To start your form elements

  14. Step 14: decide whether you would like to use radio buttons (only one clickable response from a list of choices)

  15. Step 15: checkboxes (multiple responses from a list)

  16. Step 16: dropdown list boxes

  17. Step 17: or a text box.

  18. Step 18: To create any question

  19. Step 19: type it in the web document under the <form> tag on its own line.

  20. Step 20: To create a radio button

  21. Step 21: type the code:

  22. Step 22: The type tells the browser to display a radio button.

  23. Step 23: Additional radio buttons have to have a different name.

  24. Step 24: Checkboxes work in the same manner

  25. Step 25: but the code uses the type="checkbox" instead.

  26. Step 26: A text box displays a box into which a user may type an open ended answer.

  27. Step 27: The size may be adjusted to enlarge the box

  28. Step 28: and represents the number of characters that should fit in the box based on the base font of the web page.

  29. Step 29: Type the code to create a drop-down box from which users may select from a number of options.

  30. Step 30: The selected="selected" attribute means that this option appears selected as the default value when the page loads.

  31. Step 31: Type the two lines at the bottom of the document just above the </form> tag to place buttons in your document that will send or reset the form.

  32. Step 32: Choose File

  33. Step 33: Save As in your text processor

  34. Step 34: give your document a filename

  35. Step 35: and add the extension .htm or .html to the end of this filename so that web browsers will recognize this document as a web page.

  36. Step 36: Preview your page by opening it in a web browser.

  37. Step 37: Browse to the file you created and hit OK to open the web form.

  38. Step 38: Test by selecting some buttons and clicking on Send to send the form answers.

  39. Step 39: When a user clicks Send

  40. Step 40: the user responses will appear in a new mail message with the name and value written in the body of the message.

Detailed Guide

Notepad under Windows) or if you have access to a web page editing tool, create a basic web page. ,, Web pages do not require this formatting, but it does make reading web documents easier for mortal humans., the information you intend that the page requests.,,,,, For instance, the code above would display that question on the page.,, The name of all related buttons must share a name.

All radio buttons named "1" are mutually exclusive, that is, users can select only one from the group.

The value will be passed to the email message, and the text after the <input...> tag gets displayed by the browser.

Create more radio buttons for all related responses.,,, The code looks like the example above:,,,,,, In Firefox, for example, go to File, Open File, or hit Ctrl-O or Command-O to open a new document.,,,

About the Author

E

Eric Jenkins

A seasoned expert in education and learning, Eric Jenkins combines 6 years of experience with a passion for teaching. Eric's guides are known for their clarity and practical value.

37 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: