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
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week