Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
A text input isn't ideal for every situation. The select element can be used in cases where the user should pick from a set of predefined options.
HTML Elements
- The
select
-element renders a drop-down menu that contains selectable options. This type of form control is ideal for scenarios where the user must choose one option from a preset list of 5 or more choices. - The
option
-element represents one of the choices that a user can choose in a select menu. It should always be nested inside of a select element. - The
optgroup
-element wraps one or more option elements and helps to create logical groups. The label attribute specifies the text that the optgroup should display above the nested options.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
karan Badhwar
Web Development Techdegree Graduate 18,135 Points1 Answer
-
Robert O'Toole
6,366 Points2 Answers
-
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 Points1 Answer
-
web pad
4,483 Points1 Answer
-
Scott Nichols
3,331 PointsHow do I use the addListenerEvent for onchange to a Table cell?
Posted by Scott NicholsScott Nichols
3,331 Points1 Answer
-
Narendra Joshi
9,905 Points2 Answers
-
Ephraim Michael Valladares Cordova
2,300 Points1 Answer
-
Learning coding
Front End Web Development Techdegree Student 9,937 Points1 Answer
-
Alex Diaz
4,930 Points2 Answers
-
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,625 PointsSelect menu width issue
3 Answers
-
Kevin Albright
5,385 Points1 Answer
-
qlpxjevhuv
10,503 Points3 Answers
-
dotz
6,733 Points1 Answer
-
Allison Chefec
2,781 Points4 Answers
-
Andrew Kenower
3,069 Points3 Answers
-
Nelson Fortes
3,145 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up