How to Make a Questionnaire in HTML

If you want to gather data or feedback from your website's visitors, create a questionnaire using hypertext markup language (HTML). Your questionnaire can contain a variety of input methods, from radio buttons to checkboxes to drop-down lists. After your user has filled out the questionnaire, receive his answers in your email's inbox.

Man holding clipboard and pencil
HTML forms allow you to gather all sorts of information from your website's visitors.
credit: Stockbyte/Retrofile/Getty Images

Step

Open the HTML document in which you would like to feature your questionnaire in Notepad, your web host's built-in HTML editor, or your HTML editor of choice. If you are starting a fresh web page, create a new TXT document, then insert the basic tags:

Step

Title of web page

Step

The form tags you create will go between the opening and closing

tags. When you complete your questionnaire, save the document as either HTM or HTML, then open it in any web browser to preview your work.

Step

Insert the

tag to start your questionnaire, and close it with
. All of your questions and tags will go between these two tags. Each tag should contain a "name" attribute, such as . So that the answers to your questionnaire are forwarded to your email address, your
tag should look like this:

Step

Step

Use the tag to create a one-line input field into which users can type their answers. For example, if you want to ask who referred the user to your website, your code will look like this:

Step

Referrer:

Step

Use the tag to create radio buttons. With radio buttons, the user can only select one option. Each input in your radio button set should have the same name, but unique value attributes. For example, to ask if visitors enjoyed your website, use this:

Step

Did you enjoy our website?

Step

Yes

Step

No

Step

Step

The tag creates a line break on your webpage, since HTML by itself doesn't recognize white space.

Step

Use the tag to create checkboxes. Unlike radio buttons, the user can select multiple checkboxes in a set. Just like radio buttons, each option in the set should share the same name but have unique values. For example, to ask the visitor to suggest features for your website:

Step

How can we improve our website?

Step

More pictures!

Step

More links!

Step

More content!

Step

Step

Use thetags to create a drop-down selection list from which the user can choose only one option. For each option in your list, create a separate

set between the opening and closing

Step

Since the "colors" option features the selected attribute, it will be the default selection.

Step

Use the tag to create a submit button. When the user clicks this button, the information he entered will be forwarded to you, depending on the retrieval method you specified in the opening

tag. The value attribute of your submit button contains the text that your button will read.