FORM STRUCTURE

 FORM STRUCTURE

<form>: form controls live inside a <form> element .This element should

always carry the action attribute and will usually have a method and ad id

attribute too.

action: Every form element requires an action attribute. Its value of the URL for the

page on the server that will receive the information in the form when it is submitted>

method: The form can be sent using one of the following methods: get or post.

With the get method, the values from the form are added to the end of the URL

specified in the action attribute. With the Post method, the values are sent in what is

 known as HTTP headers. 

<input>: The <input> element creates several different  form controls.

The type attribute's value determines what kind of input they will be creating.

type="text': When the type attribute has a value of text, it creates single-line text

 input.

name: When users enter information into a form, the server controls each piece

of data entered. There, each form of control requires a name attribute.  The value of

this attribute identifies the form control and is sent along with the information they 

enter to the server.

 Max length: You can use the max length attribute to limit the no. of characters 

a user may enter into the field

for example :











Comments

Popular posts from this blog

Ch-Heading Tags (blog 3)

Basic structure of HTML

Introduction to HTML