HTML 5 NEW INPUT TAG ELEMENTS

HTML 5 NEW ELEMENTS

SULE-BALOGUN OLANREWAJU
2 min readJul 21, 2019

The HTML <form> element defines a form that is used to collect user input:

Form elements are different types of input elements, like text fields, checkboxes, radio buttons, submit buttons, and more.

Brief Introduction into HTML 5 NEW ELEMENTS

Search input types allows users leverage on the built in web search api attribute like autofocus can also be added that allows the cursor focus on page load

Text input types allows a stream of characters known as text. It has an attribute pattern (used to enforce strict validation while using regular expression. Here it will allow some text , white space and some more text.

Email input type allows users input a a valid email address

Telephone input type allows user enter a valid telephone number format

Url input type allows users enter a valid url format address

Range input type has step attribute which tells the number of increments each time you move the slider in our case 10 , it also has a default attribute of value that tells where the slider should start from

Datalist element represents a set of option elements that represents predefined options for other controls. It’s great if you want to provide suggestion to users and also if want to allow them fill in their own options as well. To achieve desired output list attribute value should be the datalist id value as shown in the example below

Input type color triggers a color picker with a default color of white

Input type tel allows users input in a valid telephone number format

Date based input types allows users input based on various date types such as week, month, datetime, datetime-local

CONCLUSION

The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.

For more technical contents subscribe on https://icodemag.com

Follow on twitter @lanromanero

Happy coding🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉

--

--

SULE-BALOGUN OLANREWAJU
SULE-BALOGUN OLANREWAJU

Written by SULE-BALOGUN OLANREWAJU

Experienced Software Engineer with a demonstrated history of working in the computer software industry. Skilled in HTML, CSS, JS, Vue, Angular, PHP, Laravel

No responses yet