Home > Article > Web Front-end > How to include an option in a dropdown list in HTML?
To include options in a drop-down list, use the
HTML
Attributes | Value | Description th> |
---|---|---|
Disabled | Disabled | Disable input controls. The button will not accept changes from the user. It also fails to receive focus and is skipped on tabbing. |
Tag | Text | define when using |
Selected | Selected | When the definition page loads The default option to select. |
Value | Text | Specifies options to send to the server Value |
You can try running the following code to implement the
<!DOCTYPE html> <html> <head> <title>HTML option Tag</title> </head> <body> <form action = "/cgi-bin/dropdown.cgi" method = "post"> <select name = "dropdown"> <option value = "HTML" selected>HTML</option> <option value = "Ruby">Ruby</option> </select> <input type = "submit" value = "Submit" /> </form> </body> </html>
The above is the detailed content of How to include an option in a dropdown list in HTML?. For more information, please follow other related articles on the PHP Chinese website!