How to Make a Questionnaire in HTML

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
HTML forms allow you to gather all sorts of information from your website's visitors.
Image Credit: Stockbyte/Retrofile/Getty Images

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.


Step 1

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:

Video of the Day

Title of web page


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 2

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 3

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 4

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:



Did you enjoy our website?




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

Step 5

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:


How can we improve our website?

More pictures!

More links!

More content!



Step 6

Use the tags 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

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


Step 7

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.

Video of the Day



references & resources

Report an Issue

screenshot of the current page

Screenshot loading...