HTML5 APPLICATIONS DEVELOPMENT MANUAL

(lu) #1







Input Attributes


There are several attributes that can be used with the element


to enhance Web forms:



  • the autofocus attribute to point the focus to a specific input field when a


web page loads



  • the required attribute when a field is required

  • the placeholder attribute to add text to a field that will help users know


what to enter



  • value attribute specifies the initial value for an input field

  • readonly attribute specifies that the input field is read only (cannot be


changed)



  • disabled attribute specifies that the input field is disabled

  • size attribute specifies the size (in characters) for the input field

  • maxlength attribute specifies the maximum allowed length for the input


field


<!DOCTYPE html>


Free download pdf