BluePink BluePink
XHost
Servere virtuale de la 20 eur / luna. Servere dedicate de la 100 eur / luna - servicii de administrare si monitorizare incluse. Colocare servere si echipamente de la 75 eur / luna. Pentru detalii accesati site-ul BluePink.

above banner

banner website
under banner
home html css references contact
HOMEspace above menu HTMLCSSREFERENCES CONTACT
head of content;
monitors
under monitor image space
folder icon space between sign and sugestion Lessons

Forms

Forms area unit is for  collecting informations inputted by a user. they'll be used as associate degree interface for an online application, for instance, or to send information across the online.

On their own, forms aren’t typically particularly useful. they have a tendency to be employed in conjunction with a artificial language to method the knowledge inputted by the user. These scripts take all manner of guises that area unit for the most part outside of the remit of this web site as a result of they need languages aside from HTML and CSS.
The basic tags employed in the particular HTML of types area unit form, input, textarea, choose and possibility.

form

form defines the type and at intervals this tag, if you're employing a type for a user to submit data (which we have a tendency to are presumptuous at this level), associate degree action attribute is required to inform the shape wherever its contents are sent to.
The method attribute tells the shape however the info in it's getting to be sent and it will have the worth get, that is default, and latches the shape data onto an online address, or post, that (essentially) invisibly sends the form’s data.
get is employed for shorter chunks of non-sensitive data - you would possibly see the knowledge you have got submitted in a very net site’s search to seem within the net address of its search results page, for instance. post is employed for lengthier, safer submissions, like to bear forms.
So a type element can look one thing like this:
<form action="processingscript.php" method="post">
</form>

input

The input tag is that the dada of the shape world. It will take a mess of guises, the foremost common of that area unit printed below (see the input reference page for the complete crazy family):

     <input type="text">or just  could be a commonplace textbox. this may even have a worth attribute, that sets the initial text within the textbox.
     <input type="password">is comparable to the textbox, however the characters typewritten in by the user are hidden.
     <input type="checkbox">could be a checkbox, which might be toggled on and off by the user. this may even have a checked attribute ( - the attribute doesn’t need a value), and makes the initial state of the check box to be switched on, as it were.
     <input type="radio">is comparable to a checkbox, however the user will solely choose one radio button in a very cluster. this may even have a checked attribute.
     <input type="submit">could be a button that once elite can submit the shape. you'll be able to management the text that seems on the submit button with the value attribute, for instance .
Note that, like img and br tags, the input tag, that doesn’t surround any content, doesn’t need a closing tag.

textarea


textarea is, basically, a large, multi-line textbox. The anticipated range of rows and columns may be outlined with rows and cols attributes, though you'll be able to manipulate the dimensions to your heart’s content exploitation CSS.
<textarea rows="6" cols="21">A big load of text</textarea>
Any text you choose to place between the starting and ending tags (in this case “a big load of text”) will form the initial value of the text area.

select

The select tag works with the option tag to make drop-down select boxes.
<select>
    <option>Option 1</option>
    <option>Option 2</option>
    <option value="third option">Option 3</option>
</select>
When the shape is submitted, the worth of the chosen possibility are sent. This price are the text between the chosen gap and shutting possibility tag unless a definite price is such with the worth attribute, within which case this can be sent instead. So, within the higher than example, if the primary item is chosen, “Option 1” are sent, if the third item is chosen, “third option” are sent.
Similar to the checked attribute of checkboxes and radio buttons, associate degree possibility tag may also have a particular attribute, to begin off with one in every of the things already being elite, eg. Rodent would pre-select “Rodent” from the things.

Names

All of the tags mentioned higher than can look terribly nice given on the page however if you attach your type to a form-handling script, they're going to all be neglected. this can be as a result of the shape fields want names. thus to any or all of the fields, the attribute name must be else, for instance .
A type would possibly appear as if the one below. (Note: this type won't work unless there\'s a “contactus.php” file, that is expressed within the action attribute of the shape tag, to handle the submitted date)
<form action="contactus.php" method="post">
    <p>Name:</p>
    <p><input type="text" name="name" value="Your name"></p>
    <p>Comments: </p>
    <p><textarea name="comments" rows="5" cols="20">Your comments</textarea></p>
    <p>Are you:</p>
    <p><input type="radio" name="areyou" value="male"> Male</p>
    <p><input type="radio" name="areyou" value="female"> Female</p>
    <p><input type="radio" name="areyou" value="hermaphrodite"> An hermaphrodite</p>
    <p><input type="radio" name="areyou" value="asexual"> Asexual</p>
    <p><input type="submit"></p>
</form>
prev next
Biblography

  1. http://htmldog.com/guides/html/beginner/forms/


Introduction
Elements
Attributes Page content
Head
Tables
Forms
Colors

like hr2
end site bar

Copyright 2014 Florin Bacu | All Rights Reserved

home  contact


under copyright