HTML5 Forms Forms are used to capture user input …
HTML Inputs Input elements specify the type of input –text - provides a place to input text Your name: –password - provides a place to input text Password: –radio - provides a place to input text Male Female –checkbox - provides a place to input text I have a bike I have a car –submit - provides a place to input text Password:
HTML5 Inputs Newer input elements provide more options – - checks to make sure it’s a valid –url - checks to make sure it’s a valid URL –date - expects year-month-day –range - provides a slider for entering a number –number - expects a number
Form Attributes New attributes help customize the form –placeholder - provides temporary text –autofocus - cursor automatically jumps here –required - complains if nothing entered –pattern - JavaScript regular expression describes format –multiple - allows multiple values to be selected –novalidate - saves validation for the server-side code