Forms may seem like a really tricky part of HTML, but you will find that it can be a simple matter to create a useful feedback form for your website. You don't need to know CGI or programming to do it.
Tools For Building an HTML Form
- a text editor
You can use your favorite HTML editor, but it should be able to manipulate form items and attributes.
- a web host to place your feedback form on
- an email address to receive the feedback
- 30 minutes of free time
Steps to Build an HTML Form
- Open your text editor to create a blank page
- Build the main page container elements
- Give your page a heading.
- Start your form. Your
FORMelement will have a some special attributes:
action="mailto:your email address"
This will send the form results to your email address (be sure to change it to your personal address)
This sends it all as one request to the mail program (the
postmethod has some unusual results in most browsers)
This makes the results readable in your email box
<form action="mailto:your email address" method="get" enctype="text/plain">
- Add the questions to your form. My feedback form will have 3 questions: name, rating, and comments.
Name: <input type="text" id="name" size="30">
Please rate my site from 1 to 10 (1= bad and 10= good): <br />
<select id="rating"><br />
How would you suggest I improve it?<br />
<textarea id="improve" rows="5" cols="30"></textarea>
<input type="submit" value="Send Feedback"> <input type="reset">
- Don't forget to close your form:
- Put the final closing HTML tags on your web page:
- Save the page as
- Upload your form to your website.
- Validate your HTML to make sure that you haven't made any typos or other errors.
- Link to your form.