HTML List BoxThe list box is a graphical control element in the HTML document that allows a user to select one or more options from the list of options. SyntaxTo create a list box, use the HTML element <select> which contains two attributes Name and Size. The Name attribute is used to define the name for calling the list box, and size attribute is used to specify the numerical value that shows the how many options it contains. Examples:Example 1: Consider the below example that creates a simple list box. Test it NowOutput: Example 2: Below example uses the multiple attribute for selecting the multiple options in a list. We can select multiple options from list box by holding the ctrl key. Test it NowOutput: Next TopicAdd JavaScript to HTML |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India