HTML Introduction
HTML Basic Syntax
HTML Block Element
HTML Formatting
HTML Quotation
HTML Links
HTML List
HTML Table
HTML Audio
HTML Video
HTML Image
HTML Iframe
HTML Favicon
HTML Form
HTML Input Types
HTML Marquee
HTML Meta tag
Learn CSS
Learn Javascript
Learn Django
To create a form form tag is used. To create options of from, input tag is used. In the input tag, we use type attribute and write field type name.For example if we want a button then we will write, button in the type attribute.
1. value:What we write in value attribute, it's show on the filed so that
user
can understand why this field and what type value he has to put.
2. name: We give a name to our field by passing the name in name attribute. The
text what we put in the name attribute will go to our server and save in the
database column according to the name. Database column name and that value
we pass in name attribute must be same.
3. autocomplete: To autocomplete the field this attribute is used. It has two
values
on r off. Default is on.
4.required: If we use required attribute and pass value required, it means that
user can't submit or complete his work without filling this field.
5. min and max: We use min and max attribute when the input type is number,
range, date,
datetime-local, month, time and week. Use this to set minimum and maximum value of the
field.
6. accept: This attribute is used when the input type is file. If we write that
file extension what
we want then this field will only take that extension file.
7. minlength and maxlength: This attribute is used if out type is text or
character base
field. We use it to set how many characters user can write in the field.
8. readonly:If we use readonly=readonly, it means that we are not giving
permission
to the user to write something inside this field.User can only read that field.
9. multiple: If we write multiple=multiple, it means that user can input
multiple values
in that field.
10. placeholder: We placeholder to show massage about what kind of field is
this and what type
of value user have to input.