How to Create a Drop Down Menu Name Box

How to Create a Drop Down Menu Name Box thumbnail
Drop-down boxes provide a limited number of options for users.

Drop-down boxes provide website readers with a predetermined list of selections. They are beneficial for website forms when you want to limit the amount of input data. For instance, a drop-down box is a beneficial form element for a list of state name options. Since there are only 50 states, the developer can limit the answers from the user, which provides better data integrity. You can create a drop-down menu item using a simple text editor.

Instructions

    • 1

      Open your HTML page in any simple text editor. You can use an editor as simple as Notepad or use more advanced editors such as Notepad++ or Visual Studio.

    • 2

      Scroll down to the section where you want the drop-down menu located. The drop-down menu item is typically a part of a web page form, so it is located between "<form>" and "</form>" tags. Start the drop-down with the following block of code:
      <select name="names"> </select>

    • 3

      Populate your drop-down menu with a list of names. Each item shown in the drop-down menu is listed using a "<option>" tag. The following code creates a list of names for the drop-down menu element:
      <select name="names">
      <option value="John Smith">John Smith</option>
      <option value="Jane Smith">Jane Smith</option>
      <option value="Jane Doe">Jane Doe</option>
      </select>
      The item selected by the user is sent to the form's processing page.

    • 4

      Save the changes for your HTML file and open it with your browser. The drop-down menu list is displayed on the page, and it is used in your web page form.

Related Searches:

References

  • Photo Credit http, www, icon, web, website image by creative from Fotolia.com

Comments

You May Also Like

Related Ads

Featured