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...
Step-by-Step Guide
-
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.,,, -
Step 2: Create a web page using the basic HTML skeleton above:
-
Step 3: Enter each of these tags on a separate line
-
Step 4: except for the <title> and </title> tags
-
Step 5: which can go on the same line.
-
Step 6: In between the <title> and </title> tags
-
Step 7: insert the name of this page or project
-
Step 8: Hit {Enter} after the <body> tag.
-
Step 9: On the resulting line
-
Step 10: type the code above
-
Step 11: replacing the email address with the email address to which you wish the form sent.
-
Step 12: Hit {Enter} twice and type </form> just before the closing </html> tag.
-
Step 13: To start your form elements
-
Step 14: decide whether you would like to use radio buttons (only one clickable response from a list of choices)
-
Step 15: checkboxes (multiple responses from a list)
-
Step 16: dropdown list boxes
-
Step 17: or a text box.
-
Step 18: To create any question
-
Step 19: type it in the web document under the <form> tag on its own line.
-
Step 20: To create a radio button
-
Step 21: type the code:
-
Step 22: The type tells the browser to display a radio button.
-
Step 23: Additional radio buttons have to have a different name.
-
Step 24: Checkboxes work in the same manner
-
Step 25: but the code uses the type="checkbox" instead.
-
Step 26: A text box displays a box into which a user may type an open ended answer.
-
Step 27: The size may be adjusted to enlarge the box
-
Step 28: and represents the number of characters that should fit in the box based on the base font of the web page.
-
Step 29: Type the code to create a drop-down box from which users may select from a number of options.
-
Step 30: The selected="selected" attribute means that this option appears selected as the default value when the page loads.
-
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.
-
Step 32: Choose File
-
Step 33: Save As in your text processor
-
Step 34: give your document a filename
-
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.
-
Step 36: Preview your page by opening it in a web browser.
-
Step 37: Browse to the file you created and hit OK to open the web form.
-
Step 38: Test by selecting some buttons and clicking on Send to send the form answers.
-
Step 39: When a user clicks Send
-
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
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.
Rate This Guide
How helpful was this guide? Click to rate: