An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
5 HTML Input types you are missing!
Input tags in HTML are a way of getting an input from the user. The commonly used input types are text, password, email, number etc.
But there's more to it. Here are 5 input types that every Web Developer must know!
input type ="color":
You can now have a color picker in your webpage. How cool is that?? Just set type property as color in input tag. You can also pass a initial color value in value attribute.input type ="search":
Now this type is similar to regular text type but with a small difference. The input box automatically adds a cross icon after you start typing to clear the input field. This is very handy input type when you want to add a search box field.input type="tel":
Use this type when you want the user to fill a phone number. When accessed through a touch device (phone/tablet) the input type opens up a numerical keyboard.input type="datetime-local":
This input type allows user to select Time, Date, Month and Year.input type="range":
This is another alternative for numerical inputs. This allows user to input a numerical value with a slider control. Use min-max attributes to provide a valid range.
Make sure you try them in your next project! Good luck!
Original Link: https://dev.to/anuraggharat/5-html-input-types-you-are-missing-48k2
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To