Download ArticleDownload Article

Questionnaires are a great way of collecting data and getting feedback from your website visitors. You don’t have to use a template, software or online survey creators to have one. You can simply create it in HTML code and style it with CSS to match your current Website Design. This article will introduce the most common question types which will allow you a great flexibility when designing your questionnaire.

  1. How.com.vn English: Step 1 Create a basic HTML file in Notepad.
    Open Notepad to create a fresh web page and write the following code:
  2. How.com.vn English: Step 2 Save it as HTML file and open in your browser.
    The file is blank at the moment, but you can see that its title is Questionnaire.
    Advertisement
  3. How.com.vn English: Step 3 Insert the <form> tags.
    HTML form tags are used to send the data to server. All our questions will be enclosed inside the <form> tags.
  4. How.com.vn English: Step 4 Insert properties for <form> tag.
    • There are 3 main attributes we will use for the form tag:
      • Action - allows you to tell the form where to go once submitted (usually the file name of a script which will read and process the form data which has been submitted).
      • Name - it's usually a good idea to give your forms a name, this is used to uniquely identify your form on a given page.
      • Method - the value of this should be POST This tells the form how to send the data once submitted.
  5. How.com.vn English: Step 5 Create a Text Field.
    In this example it will be First Name Last Name box. Add the following code:
    • We have used an <input> element here. It is used to collect user information. There are few types of <input> elements - text field, check box, password, radio button, submit button, which will be used further down in this example.
    • 'br' tag creates a line break on your webpage, since HTML by itself doesn't recognize white space
    • This code will produce:
  6. How.com.vn English: Step 6 Create radio buttons.
    They allow the user to choose only one option.
    • This code will produce:
  7. How.com.vn English: Step 7 Create check box.
    Unlike the radio buttons, they allow to select more than one option.
    • This code will produce:
  8. How.com.vn English: Step 8 Create a drop-down selection list.
    This type allows visitors to pick option from the list.
    • We have done use by adding <select> tag and <option> tags for every position in our drop down list.
    • This code will produce:
  9. How.com.vn English: Step 9 Create a Comment Box.
    • We have done use by adding <Textarea> tag, which is a multiple-line text box suitable to take larger blocks of text.
    • This code will produce:
  10. How.com.vn English: Step 10 Create the submit button which allows to submit the form.
    • The value attribute of your submit button contains the button text that will be displayed.
    • This code will produce:
  11. How.com.vn English: Step 11 Save the HTML file and display in any browser.
    Your simple questionnaire should be displayed in the following form:
  12. Advertisement

Community Q&A

Search
Add New Question
  • Question
    I have created my html questionnaire and have put it in the html space on my website. It appears quite nicely, but I don't know where to find the feedback from my form. Any advice?
    How.com.vn English: Community Answer
    Community Answer
    You need a server-side language such as PHP to save your form data. You can then access it using Post and Get.
  • Question
    How can I upload HTML (codes) in to my website?
    How.com.vn English: Free Eagle
    Free Eagle
    Community Answer
    When you log into your cPanel of your website, if you go to "File Manager" then click on the folder that contains the page you wish to edit, then click on Edit. You can edit and change any code of that page. The other option is to buy website design software like: Dreamweaver, Xara Web, WebEasy, or others. You create your page in the software, and then upload it to your web host by way of FTP.
  • Question
    How can you add some color?
    How.com.vn English: Kaustubh Maladkar
    Kaustubh Maladkar
    Community Answer
    You need to learn CSS. After learning CSS you can add background color just like any other element.You can do something like below:form {background-color: orange}
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 11 people, some anonymous, worked to edit and improve it over time. This article has been viewed 152,616 times.
      How helpful is this?
      Co-authors: 11
      Updated: August 4, 2016
      Views: 152,616
      Categories: HTML
      Thanks to all authors for creating a page that has been read 152,616 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement