Html Posted January 22, 2018 Share Posted January 22, 2018 Hi, I want to create a drop down menu, like used for entering a date of birth. I looked on the Learn html section, and I also tried searching, I couldn't find what I need specifically to do. Thank you. Link to comment Share on other sites More sharing options...
Ingolme Posted January 22, 2018 Share Posted January 22, 2018 The <select> element creates a dropdown. If you're looking for something more complicated, then describe it in more detail. Link to comment Share on other sites More sharing options...
niche Posted January 22, 2018 Share Posted January 22, 2018 https://www.w3schools.com/html/html_form_elements.asp see "selection" Link to comment Share on other sites More sharing options...
Html Posted January 22, 2018 Author Share Posted January 22, 2018 (edited) Hi, I have posted this example, so I want day, then month and year of birth. I've made a start there, so where do I go from here? <select> <option value="">1</option> <option value="">2</option> <option value="">3</option> <option value="">4</option> <option value="">5</option> </select> Edited January 22, 2018 by Html Link to comment Share on other sites More sharing options...
Ingolme Posted January 23, 2018 Share Posted January 23, 2018 You need three dropdowns <select name="day"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> ... <option value="31">31</option> </select> <select name="month"> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> ... <option value="12">December</option> </select> <select name="year"> <option value="1900">1900</option> <option value="1900">1901</option> <option value="1900">1901</option> ... <option value="2018">2018</option> </select> Link to comment Share on other sites More sharing options...
ishan_shah Posted January 28, 2020 Share Posted January 28, 2020 (edited) Hello, You can use This For Providing Date Selection <input type="date"> Or You Can Also DO this: <select name="month"> <option value="Month" Selected></option> <option value="1" Selected>Jan</option> <option value="2">Feb</option> <option value="3">March</option> ... <option value="12">Dec</option> </select> <select name="day"> <option value="Select" Selected></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> ... <option value="31">31</option> </select> <select name="year"> <option value="Years"selected>Select Year</option> <option value="1900">1900</option> <option value="1900">1901</option> <option value="1900">1901</option> ... <option value="2019">2019</option> </select> Edited January 28, 2020 by ishan_shah Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now