HTML Tutorial | Form Attribute


HTML forms attribute is used to enhance the properties of HTML form elements.


HTML Form | Readonly attribute

  • HTML Readonly attribute is used to make sure that the input field is read only (it cannot be changed).
  • By placing the readonly attribute inside the input field we can achieve the desired result.
Example:
   <form>
   <input type="text"> name="firstname" readonly>
   <input type="text"> name="lastname">
   </foam>
	   

HTML Form | Disable attribute

  • HTML Disable attribute is used to disable the input field.
  • HTML disabled element is un-usable and un-clickable.
  • By placing the disable attribute inside the input field we can achieve the desired result.
Example:
   <form>
   <input type="text"> name="firstname" disable>
   <input type="text"> name="lastname">
   </foam>
	   

HTML Form | Size attribute

  • HTML Size attribute is used to define size (number of character) of the input field.
  • By placing the size="value" inside the input field we can achieve the desired result.
Example:
   <form>
   <input type="text"> name="firstname" size="40">
   <input type="text"> name="lastname">
   </foam>
	   

HTML Form | Maxlength attribute

  • HTML Maxlength attribute is used to define maximum allowable length of character for input field.
  • By placing the maxlength="value" inside the input field we can achieve the desired result.
Example:
   <form>
   <input type="text"> name="firstname">
   <input type="text"> name="lastname">
   <input type="password"> name="Password field" maxlength="20">
   </foam>
	   


Video-English
Best Use:360p or more (480p or 720p)



Video-Hindi
Best Use:360p or more (480p or 720p)