
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to specify the number of visible options for
Use the size attribute to set the number of visible options for <select> element in HTML.
Example
You can try to run the following code to implement size attribute −
<!DOCTYPE html> <html> <body> <p>Select the countries you have visited till now,</p> <select size = "5"> <option value = "india">India</option> <option value = "us">US</option> <option value = "canada">Canada</option> <option value = "aus">Australia</option> <option value = "bangladesh">Bangladesh</option> </select> </body> </html>
- Related Articles
- How to specify options for MySQL programs?
- How to specify that the details should be visible to the user in HTML?
- How to specify tab location to make it visible in the bottom with Java?
- How to specify the number of columns a table cell should span in HTML?
- Menu not visible in IE8. How to make it visible with HTML?
- How to wait for options in a select to be populated in Selenium?
- How do we set the visible number of lines in a text area in HTML?
- How to specify citation in HTML?
- How to specify a unique id for an element in HTML?
- How to specify the kind of text track in HTML?
- How to specify the type of box used for an HTML element using CSS?
- How do we specify the target for where to open the linked document in HTML?
- Can I change the text of options for SELECT via code in ABAP?
- How to specify the HTML content of the page to show in the <iframe> in HTML?
- How to specify a minimum value in HTML?

Advertisements