Open your web page and view its code. If you use a text editor, simply open your page in the editor and select the line of code where you want the drop-down menu added. If you use a visual web editor instead (for example Adobe Dreamweaver or Microsoft Expression Web), open your page and click on the page location where you want the drop-down menu to appear. After doing so, change your viewing mode to Code View. This shows you the HTML code that determines the content and appearance of your page.
Press the "Enter" key to create a blank line.
Copy and paste the following code onto the blank line:
<option selected>Select your link</option>
<option value="Sample">http://www.sample.com/">Sample website 1</option>
<option value="Sample">http://www.sample.com/">Sample website 2</option>
<option value="Sample">http://www.sample.com/">Sample website 3</option>
<input type="button" onClick="location=document.link.menu.options[document.link.menu.selectedIndex].value;" value="Go">
Update the link parameters to meet your design needs. Enter the default text at the top of the list by modifying the value directly after the <option selected> tag; change the URL of each subsequent item by adjusting the corresponding value parameter; and replace the "Sample website" text with your desired link text. You can also replace the text contained in the value parameter of the <input> tag to update the text that appears on the "Submit" button.
Save your web page and then open it in your browser. Select an option from the drop-down list and then click the adjacent button to access the selected item.
- Photo Credit laptop image by Ewe Degiampietro from Fotolia.com
How to Make an HTML Drop Box
When designing a web page or an entire site in HTML, you might need an HTML drop box. If you are not...
How to Create a PHP Web Form
PHP is a server side scripting language that is used in conjunction with HTML to create dynamic web pages. When used within...
How to Create a Quick Link Dropdown for a SharePoint Site
Using Microsoft Office SharePoint Server to host websites containing shared workspaces allows you to provide a collaborative work environment for your project...
How to Use Scrollbar With Listbox in Visual Basic 6.0
The ListBox control used in Visual Basic does not include Scrollbars as applicable properties as do other controls. When the lines of...
How to Use Hyperlinks in Dropdown Menus in Excel
Microsoft Excel is software that allows for the creation of spreadsheets. Using cells ordered horizontally by numbers and vertically by letters, this...
The select tag in HTML is normally used to create a drop-down menu. However, if you adjust its size attribute, the select...
ListBox Visual Basic Tutorial
The ListBox control in Visual Basic is a powerful tool for displaying lists of data and allowing the user to select one...